function email_write(name,domain,com,link){ var email= name+'@'+domain+'.'+com; if(link == '1'){ link_new = ""+email+""; document.write(link_new); }else{ document.write(email); } } function validate(id) { inptValue = document.getElementById(id).value; if(inptValue > ('')){ document.getElementById(id).style.backgroundColor = "#ffffff"; return true; }else{ document.getElementById(id).style.backgroundColor = "#ff0000"; return false; } } function cmMenuOver(obj) { var oSubMenu = obj.childNodes[2]; if(oSubMenu == undefined || oSubMenu == null) return(true); else { oSubMenu.style.display = "block"; return(true); } } function cmMenuOut(obj) { var oSubMenu = obj.childNodes[2]; if(oSubMenu == undefined || oSubMenu == null) return(true); else { oSubMenu.style.display = "none"; return(true); } } function formCheck() { if(validate('name')) { if(validate('phone')) { if(validate('email')) { if(validate('type')) { if(validate('totalsqf')) { if(validate('city')) { if(validate('state')) { if(validate('auth')) { return true; } else { alert("Please check the 'Security Code' field"); return false; } } else { alert("Please check the 'State' field"); return false; } } else { alert("Please check the 'City' field"); return false; } } else { alert("Please check the 'Total square Footage' field"); return false; } } else { alert("Please check the 'Type' field"); return false; } } else { alert("Please check the 'Email' field"); return false; } } else { alert("Please check the 'Phone' field"); return false; } } else { alert("Please check the 'name' field"); return false; } }