/* ====== request for /Neotek/JS/SignIn.js ======= *//*---------- Copyright 2012 Neotek Limited (http://www.neotek.co.nz). All rights reserved. -----------*/
 
/* ---------- SignIn.js ---------- */
var fileref1=document.createElement("script");fileref1.setAttribute("rel","stylesheet");fileref1.setAttribute("type","text/javascript");fileref1.setAttribute("src","/neotek/js/common.js");document.getElementsByTagName("head")[0].appendChild(fileref1);var fileref2=document.createElement("script");fileref2.setAttribute("rel","stylesheet");fileref2.setAttribute("type","text/javascript");fileref2.setAttribute("src","/neotek/js/neotekpopup.js");document.getElementsByTagName("head")[0].appendChild(fileref2);var fileref3=document.createElement("link");fileref3.setAttribute("rel","stylesheet");fileref3.setAttribute("type","text/css");fileref3.setAttribute("href","/neotek/popup.css");document.getElementsByTagName("head")[0].appendChild(fileref3);function showsignin(){document.getElementById("fullname").innerHTML="";document.getElementById("signout").style.display="none";document.getElementById("signin").style.display="inline-block";cancelsession();try{hideprocessing()}catch(a){}}function showuser(){try{var c=readCookie("FullName");if(c!=""&&c!=null){document.getElementById("fullname").innerHTML=c;document.getElementById("signin").style.display="none";document.getElementById("signout").style.display="inline-block";resetsession();setValue("Login","");setValue("Password","")}}catch(b){}try{var a=new Boolean(readCookie("dlinks")=="true");document.getElementById("bottomnavblock8").style.display=(a==true)?"none":"block";document.getElementById("bottomnavblock9").style.display=(a==true)?"block":"none"}catch(b){}try{hideprocessing()}catch(b){}}function opensignin(){try{hideprocessing()}catch(a){}var b={URL:"/sign-in.htm",Title:"",ShowClose:false,Width:170,Height:200,CloseOnLoseFocus:false};top.NeotekPopup.Show(b);addLoginHandlers();return false}function addLoginHandlers(){if(document.getElementById("Login")==null){setTimeout("addLoginHandlers()",1000)}else{document.getElementById("Login").focus();document.getElementById("Login").onkeydown=enterLogin;document.getElementById("Password").onkeydown=enterPassword}}function enterLogin(a){if(isEnter(a)){document.getElementById("Password").focus()}}function enterPassword(a){if(isEnter(a)){signin()}}function logout(){try{showprocessing();neotekscript("/neotek/signin.aspx?off=1",null,null)}catch(a){try{hideprocessing()}catch(a){}alert(a)}return false}function forgotPassword(){try{var b=append("LoginID","");showprocessing();neotekscript("/neotek/signin.aspx?off=2",b,null)}catch(a){try{hideprocessing()}catch(a){}alert(a)}return false}function signin(){try{var b=append("Login","");b=append("Password",b);if(document.getElementById("RememberLogin")!=null){b=append("RememberLogin",b)}top.NeotekPopup.Close();showprocessing();neotekscript("/neotek/signin.aspx",b,null)}catch(a){try{hideprocessing()}catch(a){}alert(a)}return false}function baseURL(a){return a.split(/\/+/g)[1]}var sessiontimeout=1200000;var sessiontimer;var autoreset=0;function msgbox(a,b){hideprocessing();var c={URL:"/neotek/alert.aspx?msgId="+b,Title:"",ShowClose:false,Width:500,Height:100,CloseOnLoseFocus:true};top.NeotekPopup.Show(c)}function showtimeout(){if(autoreset==1){autoreset=0;resetsession()}else{top.NeotekPopup.Close();var a={URL:"/neotek/useraccess/sessiontimeout.aspx",Title:"",ShowClose:false,Width:300,Height:40,DoFade:true,Rounded:true,BackgroundColor:"White",CloseOnLoseFocus:false};top.NeotekPopup.Show(a);countdown()}}function cancelsession(){if(sessiontimer!=null){clearTimeout(sessiontimer)}}function resetsession(){cancelsession();sessiontimer=setTimeout("showtimeout()",sessiontimeout-30000);neotekscript("/neotek/useraccess/sessioncontrol.aspx",null,null)}var countdowntimer;function countdown(){if(countdowntimer!=null){clearTimeout(countdowntimer)}try{s=document.getElementById("seconds").innerHTML;if(s>0){s--}else{logout();top.NeotekPopup.Close();var b={URL:"/neotek/useraccess/sessionloggedout.aspx",Title:"",ShowClose:false,Width:300,Height:40,DoFade:true,Rounded:true,BackgroundColor:"White",CloseOnLoseFocus:false};top.NeotekPopup.Show(b);return}document.getElementById("seconds").innerHTML=s}catch(a){}countdowntimer=setTimeout("countdown()",1000)}var onloadcallbacks=new Array;function addonloadcallback(a){onloadcallbacks[onloadcallbacks.length]=a}function eventhandler(){for(var b=0;b<onloadcallbacks.length;b++){try{onloadcallbacks[b]()}catch(a){alert(a.message)}}}addonloadcallback(showuser);window.onload=eventhandler; 
/* -------- SignIn.js End -------- */
 
/*  Created in 280.8005 milliseconds */
