var checkboxHeight="25",radioHeight="25",selectWidth="0";document.write('<style type="text/css">input.styled { display: none; } select.styled, select.styled2, select.styled3, select.styled4 { position: relative; opacity: 0; filter: alpha(opacity=0); z-index: 5; width: 100px } select.styled2 { width: 85px !important } select.styled3 { width: 230px !important } select.styled4 { width: 63px !important }</style>'); var Custom={init:function(){var c=document.getElementsByTagName("input"),e=Array(),f,g;for(a=0;a<c.length;a++)if((c[a].type=="checkbox"||c[a].type=="radio")&&(c[a].className=="styled"||c[a].className=="styled2"||c[a].className=="styled3"||c[a].className=="styled4")){e[a]=document.createElement("span");e[a].className=c[a].type;if(c[a].checked==true){position=c[a].type=="checkbox"?"0 -"+checkboxHeight*2+"px":"0 -"+radioHeight*2+"px";e[a].style.backgroundPosition=position}c[a].parentNode.insertBefore(e[a], c[a]);c[a].onchange=Custom.clear;e[a].onmousedown=Custom.pushed;e[a].onmouseup=Custom.check;document.onmouseup=Custom.clear}c=document.getElementsByTagName("select");for(a=0;a<c.length;a++){if(c[a].className=="styled"){g=c[a].getElementsByTagName("option");f=g[0].childNodes[0].nodeValue;f=document.createTextNode(f);for(b=0;b<g.length;b++)if(g[b].selected==true)f=document.createTextNode(g[b].childNodes[0].nodeValue);e[a]=document.createElement("span");e[a].className="select";e[a].id="select"+c[a].name; e[a].appendChild(f);c[a].parentNode.insertBefore(e[a],c[a]);c[a].onchange=Custom.choose}if(c[a].className=="styled2"){g=c[a].getElementsByTagName("option");f=g[0].childNodes[0].nodeValue;f=document.createTextNode(f);for(b=0;b<g.length;b++)if(g[b].selected==true)f=document.createTextNode(g[b].childNodes[0].nodeValue);e[a]=document.createElement("span");e[a].className="select2";e[a].id="select"+c[a].name;e[a].appendChild(f);c[a].parentNode.insertBefore(e[a],c[a]);c[a].onchange=Custom.choose}if(c[a].className== "styled3"){g=c[a].getElementsByTagName("option");f=g[0].childNodes[0].nodeValue;f=document.createTextNode(f);for(b=0;b<g.length;b++)if(g[b].selected==true)f=document.createTextNode(g[b].childNodes[0].nodeValue);e[a]=document.createElement("span");e[a].className="select3";e[a].id="select"+c[a].name;e[a].appendChild(f);c[a].parentNode.insertBefore(e[a],c[a]);c[a].onchange=Custom.choose}if(c[a].className=="styled4"){g=c[a].getElementsByTagName("option");f=g[0].childNodes[0].nodeValue;f=document.createTextNode(f); for(b=0;b<g.length;b++)if(g[b].selected==true)f=document.createTextNode(g[b].childNodes[0].nodeValue);e[a]=document.createElement("span");e[a].className="select4";e[a].id="select"+c[a].name;e[a].appendChild(f);c[a].parentNode.insertBefore(e[a],c[a]);c[a].onchange=Custom.choose}}},pushed:function(){element=this.nextSibling;this.style.backgroundPosition=element.checked==true&&element.type=="checkbox"?"0 -"+checkboxHeight*3+"px":element.checked==true&&element.type=="radio"?"0 -"+radioHeight*3+"px":element.checked!= true&&element.type=="checkbox"?"0 -"+checkboxHeight+"px":"0 -"+radioHeight+"px"},check:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 0";element.checked=false}else{if(element.type=="checkbox")this.style.backgroundPosition="0 -"+checkboxHeight*2+"px";else{this.style.backgroundPosition="0 -"+radioHeight*2+"px";group=this.nextSibling.name;inputs=document.getElementsByTagName("input");for(a=0;a<inputs.length;a++)if(inputs[a].name== group&&inputs[a]!=this.nextSibling)inputs[a].previousSibling.style.backgroundPosition="0 0";if(element.name=="mostOrderByBox")onclick=mostOrder(document.getElementById("musicForm").mostOrderByValue.value,element.value)}element.checked=true}},clear:function(){inputs=document.getElementsByTagName("input");for(var c=0;c<inputs.length;c++)if(inputs[c].type=="checkbox"&&inputs[c].checked==true&&inputs[c].className=="styled"||inputs[c].className=="styled2"||inputs[c].className=="styled3"||inputs[c].className== "styled4")inputs[c].previousSibling.style.backgroundPosition="0 -"+checkboxHeight*2+"px";else if(inputs[c].type=="checkbox"&&inputs[c].className=="styled"||inputs[c].className=="styled2"||inputs[c].className=="styled3"||inputs[c].className=="styled4")inputs[c].previousSibling.style.backgroundPosition="0 0";else if(inputs[c].type=="radio"&&inputs[c].checked==true&&inputs[c].className=="styled"||inputs[c].className=="styled2"||inputs[c].className=="styled3"||inputs[c].className=="styled4")inputs[c].previousSibling.style.backgroundPosition= "0 -"+radioHeight*2+"px";else if(inputs[c].type=="radio"&&inputs[c].className=="styled"||inputs[c].className=="styled2"||inputs[c].className=="styled3"||inputs[c].className=="styled4")inputs[c].previousSibling.style.backgroundPosition="0 0"},choose:function(){option=this.getElementsByTagName("option");for(d=0;d<option.length;d++)if(option[d].selected==true){document.getElementById("select"+this.name).childNodes[0].nodeValue=option[d].childNodes[0].nodeValue;if(this.getAttribute("id")=="vendor")onchange= getHandsetModels(document.getElementById("model"));if(this.getAttribute("id")=="regVendor")onchange=getRegHandsetModels(document.getElementById("regModel"));if(this.getAttribute("id")=="accVendor")onchange=getAccHandsetModels(document.getElementById("accModel"));if(this.getAttribute("id")=="model")onchange=resubmitPage();if(this.getAttribute("id")=="language")onchange=changeDigicelURL();if(this.getAttribute("id")=="alertPlan")onchange=getAlertPlanChildren(document.getElementById("alertPlanChild")); if(this.getAttribute("id")=="alertPlanChild")onchange=getAlertPlanChildDetails()}}};
