DomYes=document.getElementById?1:0; AgntUsr=navigator.userAgent.toLowerCase(); ExpYes=AgntUsr.indexOf('msie')!=-1?1:0; forgotPass=false; siteCookiePrefix = ""; function forgotPassPop() { OpenWin = forgotPass; if(OpenWin) var desktop=window.open(OpenWin,"Clickatell","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=610,height=510,resizable=yes"); } dataList = new Object(); showSite=false; dataList.tnull = {"url" : "","label" : "Please Select Login","clientid" : false,"username" : ""}; dataList.clickatell = {"url" : "https://www.clickatell.com/central/login.php?returnTo=clickatell","label" : "Clickatell Central (API)","forgot" : "https://www.clickatell.com/central/skins/central/password.php","clientid" : true,"oldVersion" : false,"payURL" : "https://www.clickatell.com/central/payment/step1.php","username" : "","client_id" : ""}; dataList.communicator = {"url" : "https://communicator2.clickatell.com/form.php?returnTo=clickatell&workflow=Authentication&identity=login&Submit=RemoteLogin","label" : "Communicator 2","oldVersion" : true,"forgot" : "https://communicator.clickatell.com/central/skins/central/password.php","clientid" : false,"payURL" : "https://communicator.clickatell.com/central/payment/step1.php","username" : ""}; dataList.mpro = {"url" : "https://mpro.clickatell.com/central/login.php?secure=yes&returnTo=clickatell","label" : "Messenger-Pro","forgot" : "https://mpro.clickatell.com/central/skins/central/password.php","clientid" : false,"oldVersion" : false,"payURL" : "https://mpro.clickatell.com/central/payment/step1.php","username" : ""}; dataList.affiliates = {"url" : "http://affiliates.clickatell.com/central/login.php?returnTo=clickatell","label" : "Clickatell Affiliates","forgot" : "http://affiliates.clickatell.com/central/skins/central/password.php","clientid" : false,"oldVersion" : false,"payURL" : "http://affiliates.clickatell.com/central/payment/step1.php","username" : ""}; dataList.icm = {"redir" : "http://icm.clickatell.com/","url" : "http://www.clickatell.com/central/login.php?returnTo=clickatell","label" : "Clickatell ICM","forgot" : "http://www.clickatell.com/central/skins/central/password.php","clientid" : false,"oldVersion" : false,"payURL" : "http://www.clickatell.com/central/payment/step1.php","username" : ""}; clickList = new Array('tnull','clickatell','communicator','mpro','affiliates','icm'); function setupForm(ref) { selectedObject = ref.options[ref.selectedIndex]; currentObject = dataList[selectedObject.value]; // Just redirect for now will do other stuff later if (currentObject.redir) { location.href = currentObject.redir; } currentValue = selectedObject.value; siteCookiePrefix = currentValue; if(selectedObject.value == 'tnull') { hideLayer('loginDiv'); } else { if(currentObject.clientid) { setClient('show'); document.login.client_id.value = currentObject.client_id; document.login.username.value = currentObject.username; } else if(!currentObject.clientid && currentObject.username) { setClient('hide'); document.login.username.value = currentObject.username; } else { setClient('hide'); temp_cookie=currentValue+'_temp'; cookieval=get_cookie(temp_cookie); document.login.username.value=cookieval; } if (currentObject.oldVersion) { setVersion('show'); } else { setVersion('hide'); } document.login.action = currentObject.url; if(document.login.QPP_redirect) { document.login.QPP_redirect.value = currentObject.payURL; } forgotPass = currentObject.forgot; showLayer('loginDiv'); } } function setClient(stat) { if(DomYes) ref = document.getElementById('clientDiv'); else ref = document.all.clientDiv; if(stat == 'show') { ref.className = 'showClient'; } else { ref.className = 'hideClient'; } } function setVersion(stat) { if(DomYes) { ref = document.getElementById('oldVersionDiv'); input = document.getElementById('UseOldVersion'); } else { ref = document.all.oldVersionDiv; input = document.all.UseOldVersion; } if(stat == 'show') { ref.className = 'showClient'; } else { ref.className = 'hideClient'; input.checked = false; } } function hideLayer(id) { if(DomYes) { document.getElementById(id).style.display = 'none'; } else { eval('document.all.'+id+'.style.display = "none";'); } } function showLayer(id) { if(DomYes) { document.getElementById(id).style.display = 'block'; } else { eval('document.all.'+id+'.style.display = "block";'); } } function drawSelect(ref) { var i; ref.options.length = clickList.length; for(i=0;i