function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } function setCookie(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); } function checkCookie() { username=getCookie('username'); if (username!=null && username!="") { alert('Welcome again '+username+'!'); } else { username=prompt('Please enter your name:',""); if (username!=null && username!="") { setCookie('username',username,365); } } } var response=''; function finishAjax(id,name, response) { $('#'+name+'Loading').hide(); $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); } function ljt_ajax_validate(field,loading,fieldname,loadingname,result){ loading.hide(); field.blur(function(){ if(this.value.length > 1){ loading.show(); $.post("/ajax_field_check.php", { q: field.val()+'|'+fieldname }, function(response){ result.fadeOut(); setTimeout("finishAjax('"+loadingname+"','"+fieldname+"', '"+escape(response)+"')", 400); }); } return false; }); } function ljt_ajax_voxbox_preview(id){ $.post("/ajax_voxbox_preview.php", { id: id }, function(response){ $('#show2').html(response); setTimeout('"'+escape(response)+'"', 400); }); } function correctPNG(image) // correctly handle PNG transparency in Win IE 5.5 & 6. { var arVersion = navigator.appVersion.split("MSIE"); var version = parseFloat(arVersion[1]); if ((version >= 5.5) && (document.body.filters)) { var img = image; var imgName = img.src.toUpperCase(); var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "" ; img.outerHTML = strNewHTML; } }