var srch;var errors;var rating;var postcard;function validQ1(){if(window.event.keyCode===0||window.event.keyCode===13||window.event.which===0||window.event.which===0){var cCode;cCode=window.event.keyCode;if(document.form1.q1.value===""){errors=' - Search text/phrase is required.\n';alert('The following error(s) occurred:\n'+errors);document.form1.q1.focus();return false;}else{document.form1.q.value=document.form1.q1.value;document.form1.q1.value='';document.form1.target="_self";
document.form1.method="get";document.form1.btnG.value="";document.form1.site.value="";document.form1.client.value="";document.form1.proxystylesheet.value="";document.form1.output.value="";document.form1.sitesearch.value="iita.org";document.form1.domains.value="iita.org";document.form1.method="GET";	document.form1.target="_blank";document.form1.action="http://www.google.com/u/IITAsite";}}}function validQ(){if(window.event.keyCode===0||window.event.keyCode===13||window.event.which===0||window.event.which===0){var cCode;cCode=window.event.keyCode;if(document.form1.q.value===""){errors=' - Search text/phrase is required.\n';alert('The following error(s) occurred:\n'+errors);document.form1.q.focus();return false;}else{document.form1.output.value='';document.form1.target="_self";document.form1.method="get";document.form1.btnG.value="";document.form1.site.value="";document.form1.client.value="";document.form1.proxystylesheet.value="";document.form1.sitesearch.value="iita.org";document.form1.domains.value="iita.org";document.form1.action="http://www.google.com/u/IITAsite";}}}function validQIG(){if(window.event.keyCode===0||window.event.keyCode===13||window.event.which===0||window.event.which===0){var cCode;cCode=window.event.keyCode;if(document.form1.q2.value===""){errors=' - Search text/phrase is required.\n';alert('The following error(s) occurred:\n'+errors);document.form1.q2.focus();return false;}else{document.form1.q.value=document.form1.q2.value;document.form1.q2.value='';document.form1.target="_self";document.form1.method="get";document.form1.btnG.value="";document.form1.site.value="";document.form1.client.value="";document.form1.proxystylesheet.value="";document.form1.output.value="";document.form1.sitesearch.value="iita.org";document.form1.domains.value="iita.org";document.form1.action="http://www.google.com/u/IITAsite";}}}
function validFrm2Q(){if(window.event.keyCode===0||window.event.keyCode===13||window.event.which===0||window.event.which===0){var cCode;cCode=window.event.keyCode;if(document.form2.q.value===""){errors=' - Search text/phrase is required.\n';alert('The following error(s) occurred:\n'+errors);document.form2.q.focus();return false;}else{;document.form2.target="_self";document.form2.method="get";document.form2.btnG.value="";document.form2.site.value="";document.form2.client.value="";document.form2.proxystylesheet.value="";document.form2.output.value="";document.form2.sitesearch.value="iita.org";document.form2.domains.value="iita.org";document.form2.action="http://www.google.com/u/IITAsite";}}}

function siteSearchIndex(){if(document.form1.q1.value===""){errors=' - Search text/phrase is required.\n';alert('The following error(s) occurred:\n'+errors);document.form1.q1.focus();return false;}else{srch=document.form1.q1.value;document.form1.search.value='';document.form1.q.value=srch;document.form1.target="_self";document.form1.method="get";document.form1.btnG.value="";document.form1.site.value="";document.form1.client.value="";document.form1.proxystylesheet.value="";document.form1.output.value="";document.form1.sitesearch.value="iita.org";document.form1.domains.value="iita.org";document.form1.action="http://www.google.com/u/IITAsite";}}

function siteSearch(){srch=document.form1.q.value;document.form1.q.value=srch;if(srch!==""){document.form1.target="_self";document.form1.method="get";document.form1.btnG.value="";document.form1.site.value="";document.form1.client.value="";document.form1.proxystylesheet.value="";document.form1.output.value="";document.form1.sitesearch.value="iita.org";document.form1.domains.value="iita.org";document.form1.action="http://www.google.com/u/IITAsite";return true;}}

function searchPage(){srch=document.form1.q.value;document.form1.q.value=srch;if(srch!==""){document.form1.target="_self";document.form1.method="get";document.form1.btnG.value="";document.form1.site.value="";document.form1.client.value="";document.form1.proxystylesheet.value="";document.form1.output.value="";document.form1.sitesearch.value="iita.org";document.form1.domains.value="iita.org";document.form1.action="http://www.google.com/u/IITAsite";return true;}}

function googleSearchIndex(){if(document.form1.q1.value===""){errors=' - Search text/phrase is required.\n';alert('The following error(s) occurred:\n'+errors);document.form1.q1.focus();return false;}else{srch=document.form1.q1.value;document.form1.q.value=srch;document.form1.btnG.value='';document.form1.site.value='';document.form1.client.value='';document.form1.proxystylesheet.value='';document.form1.output.value='';if(srch!==""){document.form1.q.value=srch;document.form1.domains.value="iita.org";document.form1.sitesearch.value="iita.org";document.form1.method="GET";document.form1.target="_blank";document.form1.action="http://www.google.com/u/IITAsite";}}}

function googleSearch(){document.form1.btnG.value='';document.form1.site.value='';document.form1.client.value='';document.form1.proxystylesheet.value='';document.form1.output.value='';srch=document.form1.q.value;document.form1.search.value='';if(srch!==""){document.form1.q.value=srch;document.form1.domains.value="iita.org";document.form1.sitesearch.value="iita.org";document.form1.method="GET";document.form1.target="_blank";document.form1.action="http://www.google.com/u/IITAsite";return true;}}

function siteSearchPage(){srch=document.form2.q.value;if(srch!==""){document.form2.q.value=srch;document.form2.target="_self";document.form2.method="get";document.form2.btnG.value="";document.form2.site.value="";document.form2.client.value="";document.form2.proxystylesheet.value="";document.form2.output.value="";document.form2.sitesearch.value="iita.org";document.form2.domains.value="iita.org";document.form2.action="http://www.google.com/u/IITAsite";return true;}}

function googleSearchPage(){srch=document.form2.q.value;document.form2.search.value='';document.form2.btnG.value='';document.form2.site.value='';document.form2.client.value='';document.form2.proxystylesheet.value='';document.form2.output.value='';if(srch!==""){document.form2.q.value=srch;document.form2.domains.value="iita.org";document.form2.sitesearch.value="iita.org";document.form2.method="GET";document.form2.target="_blank";document.form2.action="http://www.google.com/u/IITAsite";return true;}}

function addtomybox(imageid){eval('document.form2.boxbtn'+imageid+'.src=\'addtobox.asp?imageid='+imageid+'\';');}
function slideshow(imageid,categoryid){thebox=document.form2.box.value;thenew=document.form2.shownew.value;document.form2.action='gallery.asp?action=viewimage&slideshow=on&categoryid='+categoryid+'&imageid='+imageid+'&box='+thebox+'&shownew='+thenew;document.form2.submit();}
function stopslideshow(){window.clearTimeout(timer1);document.form2.slideshowon.style.display='';document.form2.slideshowoff.style.display='none';document.getElementById("slideshowmode").style.display='none';}
function ratefile(imageid){rating=window.open('rateimage.asp?imageid='+imageid,'rating','toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=0,width=200,height=240');}
function clearmybox(){if(confirm('Clear Your Favorite Files?')){self.location.href='gallery.asp?action=mybox&clear=1';}}
function openmybox(){openmybox=window.open('mybox.asp','openmybox','toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=0,width=400,height=300');}
function sendpostcard(imageid){postcard=window.open('sendpostcard.asp?imageid='+imageid,'postcard','toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width=720,height=460');}
function validate(){var uid=document.formLogon.usr.value;var pwd=document.formLogon.pwd.value;if(uid===""){alert("Enter your username!");document.formLogon.usr.focus();return false;}
if(pwd===""){alert("Enter your password!");document.formLogon.pwd.focus();return false;}
if(uid.indexOf(" ")>0){alert("No space allowed in member username!");document.formLogon.usr.focus();return false;}
if(uid.indexOf("--")>0){alert("No comment allowed in member username!");document.formLogon.usr.focus();return false;}
if(pwd.indexOf(" ")>0){alert("No space allowed in member password!");document.formLogon.pwd.focus();return false;}
if(pwd.indexOf("--")>0){alert("No comment allowed in member password!");document.formLogon.pwd.focus();return false;}
return true;}
function openWin(theURL,winName,features){window.open(theURL,winName,features);}
function pwdreminder(){window.open("pwdreminder.aspx","pwdreminder","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=0,width=480,height=240");}