var xmlHttp=GetXmlHttpObject(),url,msg_array=[];function GetXmlHttpObject(){xmlHttp=null;try{xmlHttp=new XMLHttpRequest}catch(a){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}return xmlHttp}function getPosition(){}
function Show_Popup(a){if(xmlHttp==null)alert("Browser does not support HTTP Request");else{document.getElementById("hdnPrdID").value=a;url="b_prdCustomizeCode.php";url=url+"?prdID="+a;xmlHttp.open("GET",url,true);xmlHttp.onreadystatechange=function(){rtnPrdCusomize()};xmlHttp.send(null);$("#popup").css("filter","alpha(opacity=70)");$("#popup").fadeIn("fast");$("#window").fadeIn("fast");$("#window").CenterIt()}}
function rtnPrdCusomize(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){msg_array=xmlHttp.responseText.split("|");msg_array[0]=="Y"?document.getElementById("fname").style.display="block":document.getElementById("fname").style.display="none";msg_array[1]=="Y"?document.getElementById("fnameIni").style.display="block":document.getElementById("fnameIni").style.display="none";msg_array[2]=="Y"?document.getElementById("mname").style.display="block":document.getElementById("mname").style.display=
"none";msg_array[3]=="Y"?document.getElementById("mnameIni").style.display="block":document.getElementById("mnameIni").style.display="none";msg_array[4]=="Y"?document.getElementById("lname").style.display="block":document.getElementById("lname").style.display="none";msg_array[5]=="Y"?document.getElementById("lmnameIni").style.display="block":document.getElementById("lmnameIni").style.display="none";msg_array[6]=="Y"?document.getElementById("spIns").style.display="block":document.getElementById("spIns").style.display=
"none";msg_array[7]=="Y"?document.getElementById("invTxt").style.display="block":document.getElementById("invTxt").style.display="none";msg_array[8]=="Y"?document.getElementById("fChoice").style.display="block":document.getElementById("fChoice").style.display="none";msg_array[9]!=""&&(document.getElementById("hdnCstmzeID").value=msg_array[9]);msg_array[10]!=""&&msg_array[0]=="Y"&&(document.getElementById("txtFirstName").value=msg_array[10]);msg_array[11]!=""&&msg_array[1]=="Y"&&(document.getElementById("txtFirstNameIni").value=
msg_array[11]);msg_array[12]!=""&&msg_array[2]=="Y"&&(document.getElementById("txtMiddleName").value=msg_array[12]);msg_array[13]!=""&&msg_array[3]=="Y"&&(document.getElementById("txtMiddleNameIni").value=msg_array[13]);msg_array[14]!=""&&msg_array[4]=="Y"&&(document.getElementById("txtLastName").value=msg_array[14]);msg_array[15]!=""&&msg_array[5]=="Y"&&(document.getElementById("txtLastNameIni").value=msg_array[15]);msg_array[16]!=""&&msg_array[6]=="Y"&&(document.getElementById("txtSpclIns").value=
msg_array[16]);msg_array[17]!=""&&msg_array[7]=="Y"&&(document.getElementById("txtInvtxt").value=msg_array[17]);msg_array[18]!=""&&msg_array[8]=="Y"&&(document.getElementById("txtFont").value=msg_array[18])}}function Close_Popup(){clearFields();$("#popup").fadeOut("fast");$("#window").fadeOut("fast")}
function Save_Popup(){if(xmlHttp==null)alert("Browser does not support HTTP Request");else{var a=document.getElementById("hdnCstmzeID").value,b=document.getElementById("hdnPrdID").value,c=msg_array[0]=="Y"?document.getElementById("txtFirstName").value:"",d=msg_array[1]=="Y"?document.getElementById("txtFirstNameIni").value:"",e=msg_array[2]=="Y"?document.getElementById("txtMiddleName").value:"",f=msg_array[3]=="Y"?document.getElementById("txtMiddleNameIni").value:"",g=msg_array[4]=="Y"?document.getElementById("txtLastName").value:
"",h=msg_array[5]=="Y"?document.getElementById("txtLastNameIni").value:"",i=msg_array[6]=="Y"?document.getElementById("txtSpclIns").value:"",j=msg_array[7]=="Y"?document.getElementById("txtInvtxt").value:"",k=msg_array[8]=="Y"?document.getElementById("hdnFont").value:"";url="b_addPrdCustomize.php";url=url+"?prdID="+b;url=url+"&ctmzID="+a;url=url+"&firstName="+c;url=url+"&firstNameInitial="+d;url=url+"&middleName="+e;url=url+"&middleNameInitial="+f;url=url+"&lastName="+g;url=url+"&lastNameInitial="+
h;url=url+"&speclInstrctns="+i;url=url+"&invitnTxt="+j;url=url+"&txtFont="+k;xmlHttp.open("GET",url,true);xmlHttp.onreadystatechange=function(){rtnAddSucess()};xmlHttp.send(null);clearFields();$("#popup").fadeOut("fast");$("#window").fadeOut("fast")}}function rtnAddSucess(){}function displayCustomFields(a){document.getElementById(a).style.display="block"}function hideCustomFields(a){document.getElementById(a).style.display="none"}
function clearFields(){msg_array[10]!=""&&msg_array[0]=="Y"&&(document.getElementById("txtFirstName").value="");msg_array[11]!=""&&msg_array[1]=="Y"&&(document.getElementById("txtFirstNameIni").value="");msg_array[12]!=""&&msg_array[2]=="Y"&&(document.getElementById("txtMiddleName").value="");msg_array[13]!=""&&msg_array[3]=="Y"&&(document.getElementById("txtMiddleNameIni").value="");msg_array[14]!=""&&msg_array[4]=="Y"&&(document.getElementById("txtLastName").value="");msg_array[15]!=""&&msg_array[5]==
"Y"&&(document.getElementById("txtLastNameIni").value="");msg_array[16]!=""&&msg_array[6]=="Y"&&(document.getElementById("txtSpclIns").value="");msg_array[17]!=""&&msg_array[7]=="Y"&&(document.getElementById("txtInvtxt").value="");msg_array[18]!=""&&msg_array[8]=="Y"&&(document.getElementById("txtFont").value="")}
$(document).ready(function(){$("#txtFont").val("Click to Select Font");$("#ListSelected").click(function(){$(this).parent().find("#ListOption").slideDown("fast").show()});$("#ListOption li").mouseover(function(){$(this).css("background-color","#4C4C4C");$(this).css("cursor","pointer")});$("#ListOption li").mouseout(function(){$(this).css("background-color","white")});$("#ListOption li").click(function(){$("#txtFont").val($(this).html());$("#hdnFont").val($(this).html());$("#txtFont").css("font-family",
$(this).html());$("#ListOption").slideUp("fast").hide()})});
