function Callback(divid) { //alert(req.responseText); document.getElementById(divid).innerHTML = req.responseText; if(divid == 'MainResults' && req.responseText != '') { $('#MainResults').slideDown("normal"); } document.getElementById('go').disabled=false; } function Callback1(divid) { //alert(req.responseText); document.getElementById(divid).innerHTML = req.responseText; } function feedback() { AJAX('','/bin/user/feedback.php','','Callback1','email_status') } function chdate() { //alert(req.responseText); window.location = ""; } function VisitorCallback(divid) { if(req.responseText.match('font')) { document.getElementById(divid).innerHTML = req.responseText; } else { window.location = "/?aid=" + req.responseText; } } function ArchiveClose() { AjaxRequest('reset=1','/bin/user/calendar.php','','chdate'); } function ArchiveOpen(tim) { AjaxRequest('calendar=' + tim,'/bin/user/calendar.php','','chdate') } function VisitorLogin() { if(document.getElementById('username1').value != '' & document.getElementById('password1').value != '') { AJAX('','/bin/user/login.php','','VisitorCallback','LoginStatus') } } function SignUp() { AJAX('','/bin/user/signup.php','','Callback1','SignupStatus') } function Print(id) { window.open("/bin/user/print.php?aid=" + id,null,"height=600,width=800,status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no"); } function eMail(id) { window.open("/bin/user/email.php?aid=" + id,null,"height=500,width=400,status=yes,toolbar=no,menubar=no,location=no"); } function mail2friend() { AJAX('','/bin/user/email.php','','Callback1','mail2friend_status'); } function PollVote(answer,id) { if(!answer) { alert('Make your choice please!'); return; } AJAX('id=' + id + '&answer=' + escape(answer),'/bin/user/poll.php','','Callback','VoteStatus' + id); } function PollResults(id) { AJAX('id=' + id,'/bin/user/poll.php','','Callback','MainResults'); } function Subscribe() { AJAX('email=' + document.getElementById('subscr_email').value + '&action=' + document.getElementById('subscr_action').value,'/bin/user/subscribe.php','','Callback','SubscrStatus'); } function comments(id) { document.getElementById('comments').innerHTML = ""; AjaxRequest('id=' + id,'/bin/user/comments.php','','Callback1','comments'); } function add_comment(id) { if(document.getElementById('comm_name').value == '' || document.getElementById('comment').value == '') { alert('All Fields Are Required'); return false; } AJAX('','/bin/user/comments.php','','Callback1','comments'); } function ShowGallery() { if(document.getElementById('thumb').style.display == 'none') { jQuery('#thumb').slideDown(); } else { jQuery('#thumb').slideUp(); } } function Switch(item, val1, val2) { if(item.checked == true) { item.value = val1; } else { item.value = val2; } } function SearchPlace(val) { if(val == 'web') { document.getElementById('s_eng').disabled=false; } else { document.getElementById('s_eng').disabled=true; } } function search(e) { if(document.getElementById('search').value != '') { if(e) { var keynum if(window.event) // IE { keynum = e.keyCode } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which } if ( keynum == 13 ) { AJAX('','/bin/user/search.php','','Callback','MainResults'); } else { return null; } } else { AJAX('','/bin/user/search.php','','Callback','MainResults'); } } } function pagination(cur,search) { document.getElementById('Results2').innerHTML = " Please wait..."; var post = 'current=' + (cur-1)*10 + '&search=' + search + '&source=site'; AjaxRequest(post,'/bin/user/search.php','','Callback1','MainResults'); } var elapse = 1000; var timer = null; function onTimer() { alert('1'); var m = document.getElementById('clock_m').innerHTML; var s = document.getElementById('clock_s').innerHTML; s -= 1; if (s < 0) { s = 59; m -= 1; } if(m < 0) { return; } document.getElementById('clock_m').innerHTML = m; document.getElementById('clock_s').innerHTML = s; timer = window.setTimeout("onTimer()",elapse); }