// In case AJAX DOESN'T work and/or your WP runs on an IIS Server,
// you may want to try one of the alterantive URI='s below:
var sajax_uri = '/';
// var sajax_uri = document.location.pathname;
// var sajax_uri = 'YOUR-ABSOLUTE-PATH-TO-THE-PAGE';
var sajax_debug_mode = false;
var sajax_request_type = "POST";
var sajax_target_id = "";
var sajax_failure_redirect = "";
function sajax_debug(text){if(sajax_debug_mode)alert(text)}function sajax_init_object(){sajax_debug("sajax_init_object() called..");var A;var msxmlhttp=new Array('Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');for(var i=0;i');msgbox='usermessage'+no;if(document.getElementById(msgbox+'a'))document.getElementById(msgbox+'a').className="info failure";if(document.getElementById(msgbox+'b'))document.getElementById(msgbox+'b').className="info failure";doInnerXHTML(msgbox,stringXHTML.replace(/\\/g,""),'');err=err.replace(/\\/g,"");if(document.getElementById('cf_popup'+no).value.charAt(popFlag)=='y'){err=err.replace(//g,'\r\n');err=err.replace(/<.?strong>/g,'*');err=err.replace(/(<([^>]+)>)/ig,'');alert(err)}}function clearField(thefield){if(thefield.defaultValue==thefield.value)thefield.value=''};function setField(thefield){if(thefield.value=='')thefield.value=thefield.defaultValue};function cforms_validate(no,upload){if(!no)no='';msgbox='usermessage'+no;if(document.getElementById(msgbox+'a'))document.getElementById(msgbox+'a').className="info";if(document.getElementById(msgbox+'b'))document.getElementById(msgbox+'b').className="info";waiting=decodeURI(document.getElementById('cf_working'+no).value);waiting=waiting.replace(/\\/g,"");if(!document.getElementById('ll'+no)||(document.getElementById('ll'+no).innerHTML.toLowerCase()!='cforms contact form by delicious:days'))return true;var all_custom_error=new Array();var error_container=decodeURIComponent(document.getElementById('cf_customerr'+no).value);error_container=error_container.split('|');for(i=0;i'+all_custom_error[objColl[i].id];newclass=newclass+' error';if(all_valid)objColl[i].focus();if(n&&n.nodeName.toLowerCase()=="label"&&!n.className.match(/errortxt/))n.className=n.className+" errortxt";else if(p&&p.nodeName.toLowerCase()=="label"&&!p.className.match(/errortxt/))p.className=p.className+" errortxt";all_valid=false}else{if(n&&n.nodeName.toLowerCase()=="label"&&n.className.match(/errortxt/))n.className=n.className.substr(0,n.className.search(/ errortxt/));else if(p&&p.nodeName.toLowerCase()=="label"&&p.className.match(/errortxt/))p.className=p.className.substr(0,p.className.search(/ errortxt/))}}else if(temp.match(/cformselect/)){if(objColl[i].value==''||objColl[i].value=='-'){newclass=newclass+' error';all_valid=false;if(all_custom_error[objColl[i].id]&&all_custom_error[objColl[i].id]!='')custom_error=custom_error+'
'+all_custom_error[objColl[i].id]}}else if(objColl[i].value==''||regexp==null){newclass=newclass+' error';all_valid=false;if(all_custom_error[objColl[i].id]&&all_custom_error[objColl[i].id]!='')custom_error=custom_error+'
'+all_custom_error[objColl[i].id]}}if(temp.match(/email/)){newclass=newclass+' fldemail';if(objColl[i].value==''&&!temp.match(/required/));else if(!objColl[i].value.match(regexp_e)){newclass=newclass+' error';all_valid=false;if(all_custom_error[objColl[i].id]&&all_custom_error[objColl[i].id]!='')custom_error=custom_error+'
'+all_custom_error[objColl[i].id]}}objColl[i].className=newclass}}if(document.getElementById('cforms_q'+no)&&(document.getElementById('cforms_a'+no).value!=hex_md5(encodeURI(document.getElementById('cforms_q'+no).value.toLowerCase())))){document.getElementById('cforms_q'+no).className="secinput error";if(all_valid){all_valid=false;code_err=true}if(all_custom_error['cforms_q'+no]&&all_custom_error['cforms_q'+no]!='')custom_error=custom_error+'
'+all_custom_error['cforms_q'+no]}if(document.getElementById('cforms_captcha'+no)&&(document.getElementById('cforms_cap'+no).value!=hex_md5(document.getElementById('cforms_captcha'+no).value.toLowerCase()))){document.getElementById('cforms_captcha'+no).className="secinput error";if(all_valid){all_valid=false;code_err=true}if(all_custom_error['cforms_captcha'+no]&&all_custom_error['cforms_captcha'+no]!='')custom_error=custom_error+'
'+all_custom_error['cforms_captcha'+no]}if(all_valid&&upload){document.getElementById('sendbutton'+no).style.cursor="progress";return true}else if(all_valid){document.getElementById('sendbutton'+no).style.cursor="progress";document.getElementById('sendbutton'+no).disabled=true;cforms_submitcomment(no)}if(!all_valid&&!code_err){call_err(no,document.getElementById('cf_failure'+no),custom_error,1);return false}if(!all_valid){call_err(no,document.getElementById('cf_codeerr'+no),custom_error,1);return false}return false}else return true}function doInnerXHTML(elementId,stringXHTML,stringDOM){try{if(document.getElementById(elementId+'a'))document.getElementById(elementId+'a').innerHTML=stringXHTML;if(document.getElementById(elementId+'b'))document.getElementById(elementId+'b').innerHTML=stringXHTML;return true}catch(ee){return false}}function cforms_submitcomment(no){var regexp=new RegExp('[$][#][$]',['g']);var prefix='$#$';if(no=='')params='1';else params=no;objColl=document.getElementById('cforms'+no+'form').getElementsByTagName('*');for(var i=0,j=objColl.length;i1)params=params+prefix+group.substring(0,group.length-1);else params=params+prefix+"-"}else params=params+prefix+(objColl[i].checked?"X":"-")}else if(typ=="radio"&&objColl[i].checked){params=params+prefix+objColl[i].value}else if(typ=="select-multiple"){all_child_obj='';for(z=0;z/g,'\r\n');stringXHTML=stringXHTML.replace(/(<.?strong>|<.?b>)/g,'*');stringXHTML=stringXHTML.replace(/(<([^>]+)>)/ig,'');alert(stringXHTML)}}var hexcase=0;var b64pad="";var chrsz=8;function hex_md5(s){return binl2hex(core_md5(str2binl(s),s.length*chrsz))}function b64_md5(s){return binl2b64(core_md5(str2binl(s),s.length*chrsz))}function str_md5(s){return binl2str(core_md5(str2binl(s),s.length*chrsz))}function hex_hmac_md5(key,data){return binl2hex(core_hmac_md5(key,data))}function b64_hmac_md5(key,data){return binl2b64(core_hmac_md5(key,data))}function str_hmac_md5(key,data){return binl2str(core_hmac_md5(key,data))}function md5_vm_test(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function core_md5(x,len){x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i16)bkey=core_md5(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++){ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C}var hash=core_md5(ipad.concat(str2binl(data)),512+data.length*chrsz);return core_md5(opad.concat(hash),512+128)}function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function bit_rol(num,cnt){return(num<>>(32-cnt))}function str2binl(str){var bin=Array();var mask=(1<>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32);return bin}function binl2str(bin){var str="";var mask=(1<>5]>>>(i%32))&mask);return str}function binl2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i>2]>>((i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF)}return str}function binl2b64(binarray){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i>2]>>8*(i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0;j<4;j++){if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F)}}return str}