// JavaScript Document function ajaxLoader(url,id) { if (document.getElementById(id)) { document.getElementById(id).innerHTML= '
Loading....
'; var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { el = document.getElementById(id); el.innerHTML = x.responseText; } } x.open("GET", url, true); x.send(null); } } function preloader(id) { if (document.getElementById(id)) { document.getElementById(id).innerHTML= '
'; } } function ajaxLoader2(url,id) { if (document.getElementById(id)) { document.getElementById(id).innerHTML= '
'; var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { el = document.getElementById(id); el.innerHTML = x.responseText; } } x.open("GET", url, true); x.send(null); } } function ajaxLoader2Update(url,id) { if (document.getElementById(id)) { document.getElementById(id).innerHTML= '
'; var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { el = document.getElementById(id); el.innerHTML = x.responseText; ajaxUpdate(); } } x.open("GET", url, true); x.send(null); } } function ajaxLoader4(url,id) { if (document.getElementById(id)) { document.getElementById(id).innerHTML= '
'+ document.getElementById(id).innerHTML+'
'; var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { el = document.getElementById(id); el.innerHTML = x.responseText; } } x.open("GET", url, true); x.send(null); } } function ajaxLoader3(url,id) { if (document.getElementById(id)) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { el = document.getElementById(id); el.innerHTML = x.responseText+el.innerHTML ; } } x.open("GET", url, true); x.send(null); } } function ajaxLoaderPlain(url,id) { if (document.getElementById(id)) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { el = document.getElementById(id); el.innerHTML = x.responseText; } } x.open("GET", url, true); x.send(null); } } function ajaxLoaderPlainUpdate(url,id) { if (document.getElementById(id)) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { el = document.getElementById(id); el.innerHTML = x.responseText; ajaxUpdate(); } } x.open("GET", url, true); x.send(null); } } jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox({ loading_image : '/javascripts/facebox/loading.gif', close_image : '/javascripts/facebox/closelabel.gif' }) //for buttons $('button[rel*=facebox]').facebox({ loading_image : '/javascripts/facebox/loading.gif', close_image : '/javascripts/facebox/closelabel.gif' }) }) function submitJoinList() { document.getElementById('joinlistmessage').innerHTML = ' '; //verify var formObj = new DHTMLSuite.form({ formRef:'joinlistform',action:'/index/ajaxjoinlist',callbackOnComplete:'checkJoinListStatus()',responseEl:'joinlistmessage' }); var status = formObj.submit(); return status; } function submitLogin() { document.getElementById('loginmessage').innerHTML = ' '; //verify var formObj = new DHTMLSuite.form({ formRef:'loginform',action:'/account/login',callbackOnComplete:'checkLoginStatus()',responseEl:'loginmessage'}); var status = formObj.submit(); return status; } function checkJoinListStatus() { if(document.getElementById('joinliststatus')) { var status = document.getElementById('joinliststatus').value; if(status == 'true') { window.setTimeout("jQuery.facebox.close()",1500); } } } function checkLoginStatus() { if(document.getElementById('loginstatus')) { var status = document.getElementById('loginstatus').value; if(status == 'true') { window.setTimeout("jQuery.facebox.close()",1500); document.location.reload(true); } } } function bookmarksite(title,url){ if (window.sidebar) // firefox window.sidebar.addPanel(title, url, ""); else if(window.opera && window.print){ // opera var elem = document.createElement('a'); elem.setAttribute('href',url); elem.setAttribute('title',title); elem.setAttribute('rel','sidebar'); elem.click(); } else if(document.all)// ie window.external.AddFavorite(url, title); } function updateResponseDiv(req) { Spry.Utils.setInnerHTML('joinlistmessage', req.xhRequest.responseText); }