function ht1_onerror() {window.alert("ht1_onerrorupdate");}
function pth(sp) {var i=sp.lastIndexOf("\\");var j=sp.lastIndexOf("/");if (i>j){sp= sp.substring(0,i+1).toLowerCase();} else {sp= sp.substring(0,j+1).toLowerCase();};return(sp);}
function reset1_onclick() {pwd1.innerText="";ht1.href=pth(document.images.img1.src) + "hazna3.htm";ht1.innerText="Not available";ht2.href=pth(document.images.img1.src) + "hazna3.htm";ht2.innerText="Not available";ht3.href=pth(document.images.img1.src) + "hazna3.htm";ht3.innerText="Not available";ht4.href=pth(document.images.img1.src) + "hazna3.htm";ht4.innerText="Not available";ht1.style.background="gold";ht2.style.background="gold";ht3.style.background="gold";ht4.style.background="gold";}
function submit1_onclick() {var r,re;var cdta=cdecheck();var cono="",cnme="",ccde="";var spth=pth(document.images.img1.src);var fstat;if (!(cdta=="")) {fstat=cdta.substr(0,3);cono=cdta.substr(4,2);ccde=cdta.substr(4,5);cnme=cdta.substr(10);ht1.href=spth + "hazud" + cnme + ".doc";if (fstat.indexOf("d")>=0 ){ht1.innerText="hazud" + cnme + ".doc" + " available";ht1.style.background="pink";}else {ht1.href=spth + "hazna3.htm";ht1.style.background="gold";ht1.innerText="hazud" + cnme + ".doc" + " not available";};ht2.href=spth + "hazud" + cnme + ".rtf";if (fstat.indexOf("r")>=0 ){ht2.innerText="hazud" + cnme + ".rtf" + " available";ht2.style.background="pink";}else {ht2.href=spth + "hazna3.htm";ht2.style.background="gold";ht2.innerText="hazud" + cnme + ".rtf" + " not available";};ht3.href=spth + "hazud" + cnme + ".zip";if (fstat.indexOf("z")>=0 ){ht3.innerText="hazud" + cnme + ".zip" + " available";ht3.style.background="pink";}else {ht3.href=spth + "hazna3.htm";ht3.style.background="gold";ht3.innerText="hazud" + cnme + ".zip" + " not available";};ht4.href=spth + "hazudgen.doc";if (fstat.indexOf("g")>=0 ){ht4.innerText="hazudgen.doc" + " available";ht4.style.background="pink";}else {ht4.href=spth + "hazna3.htm";ht4.style.background="gold";ht4.innerText="hazudgen.doc" + " not available";};}else {ht1.href=spth + "hazna3.htm";ht1.innerText="Not available";ht2.href=spth + "hazna3.htm";ht2.innerText="Not available";ht3.href=spth + "hazna3.htm";ht3.innerText="Not available";ht4.href=spth + "hazna3.htm";ht4.innerText="Not available";ht1.style.background="gold";ht2.style.background="gold";ht3.style.background="gold";ht4.style.background="gold";};}
function cdecheck(){var x;var r1,r2,re;s1=pwd1.value;s1=s1.toLowerCase();re = /^u\w\w\w\w\w/i;r1 = s1.search(re);if (r1<0){window.alert("Invalid Key code : 'xxxxxx...'");x="";}else {s1=s1.substr(1,5);x=conme(s1);};return(x);}
function conme(cde) {var i=0,j=0;s2="";for (i=1;i<=coar.length-1;i++){s1=coar[i];j=s1.indexOf(cde);if (j==4){s2=s1.substring(0,s1.indexOf("-"));break;};};if (s2.length<12){s2=""};return(s2);}

