var checkboxHeight="25";var radioHeight="25";var selectWidth="235";var selectWidth1="100";var selectWidth2="140";var selectWidth3="45";var selectWidth4="320";document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: '+selectWidth+"px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>");document.write('<style type="text/css">input.styled1 { display: none; } select.styled1 { position: relative; width: '+selectWidth1+"px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>");document.write('<style type="text/css">input.styled2 { display: none; } select.styled2 { position: relative; width: '+selectWidth2+"px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>");document.write('<style type="text/css">input.styled3 { display: none; } select.styled3 { position: relative; width: '+selectWidth3+"px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>");document.write('<style type="text/css">input.styled4 { display: none; } select.styled4 { position: relative; width: '+selectWidth4+"px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>");var Custom={init:function(){var e=document.getElementsByTagName("input"),g=Array(),c,f,h;for(a=0;a<e.length;a++){if((e[a].type=="checkbox"||e[a].type=="radio")&&e[a].className=="styled"){var i=e[a].type+e[a].name+a;if(document.getElementById(i)==null){g[a]=document.createElement("span");g[a].className=e[a].type;g[a].id=e[a].type+e[a].name+a;if(!e[a].id){e[a].id=e[a].name+a}if(e[a].checked==true){if(e[a].type=="checkbox"){position="0 -"+(checkboxHeight*2)+"px";g[a].style.backgroundPosition=position}else{position="0 -"+(radioHeight*2)+"px";g[a].style.backgroundPosition=position}}e[a].parentNode.insertBefore(g[a],e[a]);e[a].onchange=Custom.clear;if(!e[a].getAttribute("disabled")){g[a].onmousedown=Custom.pushed;g[a].onmouseup=Custom.check}else{g[a].className=g[a].className+=" disabled"}}}}e=document.getElementsByTagName("select");for(a=0;a<e.length;a++){if(e[a].className=="styled"){var i="select"+e[a].name;if(document.getElementById(i)==null){f=e[a].getElementsByTagName("option");h=f[0].childNodes[0].nodeValue;c=document.createTextNode(h);for(b=0;b<f.length;b++){if(f[b].selected==true){c=document.createTextNode(f[b].childNodes[0].nodeValue)}}g[a]=document.createElement("span");g[a].className="select";g[a].id="select"+e[a].name;g[a].appendChild(c);e[a].parentNode.insertBefore(g[a],e[a]);if(!e[a].getAttribute("disabled")){e[a].onchange=Custom.choose}else{e[a].previousSibling.className=e[a].previousSibling.className+=" disabled"}}}}for(a=0;a<e.length;a++){if(e[a].className=="styled1"){var i="select"+e[a].name;if(document.getElementById(i)==null){f=e[a].getElementsByTagName("option");h=f[0].childNodes[0].nodeValue;c=document.createTextNode(h);for(b=0;b<f.length;b++){if(f[b].selected==true){c=document.createTextNode(f[b].childNodes[0].nodeValue)}}g[a]=document.createElement("span");g[a].className="select1";g[a].id="select"+e[a].name;g[a].appendChild(c);e[a].parentNode.insertBefore(g[a],e[a]);if(!e[a].getAttribute("disabled")){e[a].onchange=Custom.choose}else{e[a].previousSibling.className=e[a].previousSibling.className+=" disabled"}}}}for(a=0;a<e.length;a++){if(e[a].className=="styled2"){var i="select"+e[a].name;if(document.getElementById(i)==null){f=e[a].getElementsByTagName("option");h=f[0].childNodes[0].nodeValue;c=document.createTextNode(h);for(b=0;b<f.length;b++){if(f[b].selected==true){c=document.createTextNode(f[b].childNodes[0].nodeValue)}}g[a]=document.createElement("span");g[a].className="select2";g[a].id="select"+e[a].name;g[a].appendChild(c);e[a].parentNode.insertBefore(g[a],e[a]);if(!e[a].getAttribute("disabled")){e[a].onchange=Custom.choose}else{e[a].previousSibling.className=e[a].previousSibling.className+=" disabled"}}}}for(a=0;a<e.length;a++){if(e[a].className=="styled3"){var i="select"+e[a].name;if(document.getElementById(i)==null){f=e[a].getElementsByTagName("option");h=f[0].childNodes[0].nodeValue;c=document.createTextNode(h);for(b=0;b<f.length;b++){if(f[b].selected==true){c=document.createTextNode(f[b].childNodes[0].nodeValue)}}g[a]=document.createElement("span");g[a].className="select3";g[a].id="select"+e[a].name;g[a].appendChild(c);e[a].parentNode.insertBefore(g[a],e[a]);if(!e[a].getAttribute("disabled")){e[a].onchange=Custom.choose}else{e[a].previousSibling.className=e[a].previousSibling.className+=" disabled"}}}}for(a=0;a<e.length;a++){if(e[a].className=="styled4"){var i="select"+e[a].name;if(document.getElementById(i)==null){f=e[a].getElementsByTagName("option");h=f[0].childNodes[0].nodeValue;c=document.createTextNode(h);for(b=0;b<f.length;b++){if(f[b].selected==true){c=document.createTextNode(f[b].childNodes[0].nodeValue)}}g[a]=document.createElement("span");g[a].className="select4";g[a].id="select"+e[a].name;g[a].appendChild(c);e[a].parentNode.insertBefore(g[a],e[a]);if(!e[a].getAttribute("disabled")){e[a].onchange=Custom.choose}else{e[a].previousSibling.className=e[a].previousSibling.className+=" disabled"}}}}document.onmouseup=Custom.clear},pushed:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight*3+"px"}else{if(element.checked==true&&element.type=="radio"){this.style.backgroundPosition="0 -"+radioHeight*3+"px"}else{if(element.checked!=true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight+"px"}else{this.style.backgroundPosition="0 -"+radioHeight+"px"}}}},check:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 0";if(element.checked==true){$("#"+element.id).change()}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.checked==false){$("#"+element.id).change()}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].previousSibling.style.backgroundPosition="0 -"+checkboxHeight*2+"px"}else{if(inputs[c].type=="checkbox"&&inputs[c].className=="styled"){inputs[c].previousSibling.style.backgroundPosition="0 0"}else{if(inputs[c].type=="radio"&&inputs[c].checked==true&&inputs[c].className=="styled"){inputs[c].previousSibling.style.backgroundPosition="0 -"+radioHeight*2+"px"}else{if(inputs[c].type=="radio"&&inputs[c].className=="styled"){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}}}};window.onload=Custom.init;