function hiconversion_criteria_id(A,C){var B=new Object();B.kind="id";B.nodeType=A.toUpperCase();B.nodeId=C;return B;}function hiconversion_criteria_type(A){var B=new Object();B.kind="type";B.nodeType=A.toUpperCase();return B;}function hiconversion_criteria_attributes_one(A,C,E,B,F){var H=new Array();var D=new Object();D.name=B.toLowerCase();D.value=F.toLowerCase();H[H.length]=D;var G=new Object();G.kind="attributes";G.nodeType=A.toUpperCase();G.index=C;G.length=E;G.properties=H;return G;}function hiconversion_criteria_attributes_two(B,G,A,F,J,E,I){var H=new Array();var D=new Object();D.name=F.toLowerCase();D.value=J.toLowerCase();H[H.length]=D;var C=new Object();C.name=E.toLowerCase();C.value=I.toLowerCase();H[H.length]=C;var K=new Object();K.kind="attributes";K.nodeType=B.toUpperCase();K.index=G;K.length=A;K.properties=H;return K;}function hiconversion_criteria_parent(A,B,C){var D=new Object();D.kind="parent";D.index=B;D.length=C;D.nodeType=A.toUpperCase();return D;}function hiconversion_criteria_child(A){var B=new Object();B.kind="child";B.nodeType=A.toUpperCase();return B;}function hiconversion_criteria_previous(A){var B=new Object();B.kind="previous";B.nodeType=A.toUpperCase();return B;}function hiconversion_criteria_next(A){var B=new Object();B.kind="next";B.nodeType=A.toUpperCase();return B;}function hiconversion_url_get(D){var E=null;var C=document.URL.indexOf(D+"=");if(C>=0){var F=document.URL.indexOf(";",C);var A=document.URL.indexOf("&",C);var B=document.URL.indexOf("#",C);if(F>0){E=document.URL.substring(C+D.length+1,F);}else{if(A>0){E=document.URL.substring(C+D.length+1,A);}else{if(B>0){E=document.URL.substring(C+D.length+1,B);}else{E=document.URL.substring(C+D.length+1);}}}}return E;}function hiconversion_priority(A){if(A=="all"){return 0;}if(A=="trace"){return 1;}if(A=="debug"){return 2;}if(A=="info"){return 3;}if(A=="warn"){return 4;}if(A=="error"){return 5;}if(A=="fatal"){return 6;}if(A=="none"){return 7;}return -1;}function hiconversion_alert(D,F){var C="hiconversion_priority";var H=hiconversion_url_get(C);if(H&&H!=null){var B=hiconversion_priority(D.toLowerCase());var A=hiconversion_priority(H.toLowerCase());if(A>=0){if(B>=A){alert(hiconversion_format(F));}return ;}}var G=hiconversion_cookie_get(C);if(G&&G!=null){var B=hiconversion_priority(D.toLowerCase());var E=hiconversion_priority(G.toLowerCase());if(E>=0){if(B>=E){alert(hiconversion_format(F));}return ;}}}function hiconversion_debug(A){hiconversion_alert("debug",A);}function hiconversion_error(A){hiconversion_alert("error",A);}function hiconversion_fatal(A){hiconversion_alert("fatal",A);}function hiconversion_info(A){hiconversion_alert("info",A);}function hiconversion_warn(A){hiconversion_alert("warn",A);}function hiconversion_trace(A){hiconversion_alert("trace",A);}function hiconversion_format(M){var E="";var H=0;M=M+"";var I=M.split("\n");for(var F=0;F80){var G=L[D].indexOf("?");if(G>=0){K[K.length]=L[D].substring(0,G+1);var A=L[D].substring(G+1);if(A.length>80){var J=A.split("&");for(var C=0;C=0){var I="hiconversion_url=";var F=N.indexOf(I);if(F>=0){N=N.substring(F+I.length);var L=N.indexOf("&");if(L>=0){N=N.substring(0,L);}N=decodeURIComponent(N);}}if(C=="action"){var B=N.indexOf("?");if(B>=0){N=N.substring(0,B);}}}if(C=="height"||C=="width"){var H=N;H=H.replace("px","");H=hiconversion_trim(H);var A=true;if(H.length==0){A=false;}else{for(var G=0;GE.length){H=E.length;}if(H<=0){var J=new Array();return J;}else{if(H==1){var J=new Array();for(var F=0;FC){return 1;}return 0;}function hiconversion_cookie_clear(B){var A=new Date();A.setTime(A.getTime()-1);document.cookie=B+"=; path=/; expires="+A.toGMTString();}function hiconversion_cookie_get(A){var B=document.cookie.match("(^|;) ?"+A+"=([^;]*)(;|$)");if(B){return unescape(B[2]);}else{return null;}}function hiconversion_cookie_set(B,D){var C=null;var A=location.hostname.split(".");if(A.length>=2){C="."+A[A.length-2]+"."+A[A.length-1];document.cookie=B+"="+escape(D)+"; path=/; max-age=28800; domain="+C;}else{document.cookie=B+"="+escape(D)+"; path=/; max-age=28800";}}function hiconversion_criteria(Q,O,Z,E,S,C){try{Z.nodeType;}catch(L){var g=new Object();g.kind="permission";return g;}if(Z.nodeType!=1){var g=new Object();g.kind="nodeType";return g;}if(!Z.tagName||Z.tagName==null||Z.tagName=="null"||Z.tagName=="!"||Z.tagName.indexOf("/")==0){var g=new Object();g.kind="tagName";g.elements=new Array();g.message=Z.tagName;return g;}var A=Z.tagName.toLowerCase();if(A=="script"||A=="noscript"){var g=new Object();g.kind="ok";g.elements=new Array();return g;}if(E==0&&(A=="input"||A=="img"||A=="param"||A=="option")){var g=new Object();g.kind="ok";g.elements=new Array();return g;}var g=hiconversion_frame_path(Q,O);if(g.kind!="ok"){return g;}var c=g.framePath;if(S){var X=S[Z.hiconversion_id];if(X!=null){var R=new Array();for(var d=0;d0){var J=Z.parentNode;if(J!=null){var D=null;var V=null;var H=-1;var F=0;for(var d=0;d=0){if(V==null){V=W;}}else{if(Z==W){H=F;}else{D=W;}}if(W.tagName==Z.tagName){F++;}}if(D!=null){var g=hiconversion_criteria(Q,O,D,0,S,C);if(g.kind!="ok"){return g;}if(g.elements.length>0){var I=new Object();I.kind="previous";I.framePath=c;I.nodeType=Z.tagName;g.elements[g.elements.length]=I;if(S){S[Z.hiconversion_id]=g.elements;}return g;}}if(V!=null){var g=hiconversion_criteria(Q,O,V,0,S,C);if(g.kind!="ok"){return g;}if(g.elements.length>0){var I=new Object();I.kind="next";I.framePath=c;I.nodeType=Z.tagName;g.elements[g.elements.length]=I;if(S){S[Z.hiconversion_id]=g.elements;}return g;}}}for(var d=0;d0){var I=new Object();I.kind="child";I.framePath=c;I.nodeType=Z.tagName;g.elements[g.elements.length]=I;if(S){S[Z.hiconversion_id]=g.elements;}return g;}}var g=hiconversion_criteria(Q,O,J,E,S,C);if(g.kind!="ok"){return g;}if(g.elements.length>0){var I=new Object();I.kind="parent";I.framePath=c;I.nodeType=Z.tagName;I.index=H;I.length=F;g.elements[g.elements.length]=I;if(S){S[Z.hiconversion_id]=g.elements;}return g;}}var g=new Object();g.kind="ok";g.elements=new Array();return g;}function hiconversion_display_attributes(D){var C="";if(D&&D!=null){var A=hiconversion_attributes(D);for(var B=0;B0){C=C+"\n";}C=C+"Criteria: "+B;if(E.kind){C=C+" kind: "+E.kind;}if(E.framePath){C=C+" framePath: "+E.framePath;}if(E.id){C=C+" id: "+E.id;}if(E.nodeId){C=C+" nodeId: "+E.nodeId;}if(E.nodeClass){C=C+" nodeClass: "+E.nodeClass;}if(E.nodeType){C=C+" nodeType: "+E.nodeType;}if(E.index>=0){C=C+" index: "+E.index;}if(E.length>=0){C=C+" length: "+E.length;}if(E.start>=0){C=C+" start: "+E.start;}if(E.end>=0){C=C+"end: "+E.end;}if(E.properties){C=C+" properties["+E.properties.length+"]";for(var A=0;A0){C=C+",";}C=C+" properties["+A+"]: "+E.properties[A].name+" "+E.properties[A].value;}}}}alert(C);}function hiconversion_display_duplicates(F){var E="";if(F){if(F.length==0){E="no duplicates";}else{for(var C=0;C0){var K=A[0];if(K.framePath&&K.framePath!=null&&K.framePath!=""){var N=K.framePath.split(".");for(var H=0;H1){var G=new Object();G.kind="frame";G.id=K.id;G.node=null;G.frame=null;G.message=N[H];return G;}else{E=I[0];}}}}}for(var H=0;H50){var B=K.id;if(!B||B==null){B=-1;}hiconversion_trace(J+" hiconversion_find[id: "+B+"] took: "+M+" ms");}if(G){L=G.node;if(L){continue;}else{return G;}}else{var G=new Object();G.kind="invalid";G.id=K.id;G.node=null;G.frame=null;G.message="";return G;}}var G=new Object();if(L){G.kind="ok";G.node=L;G.frame=E;}else{G.kind="none";G.node=null;G.frame=null;G.message="";}return G;}function hiconversion_find_helper(N,A,G){if(G.kind=="id"){var Q=N.document.getElementById(G.nodeId);if(Q==null){var Y=new Object();Y.id=G.id;Y.kind="none";Y.node=null;Y.frame=null;Y.message="";return Y;}else{if(Q.tagName&&Q.tagName&&Q.tagName.toLowerCase()==G.nodeType.toLowerCase()){var Y=new Object();Y.kind="ok";Y.frame=N;Y.node=Q;return Y;}else{var Y=new Object();Y.id=G.id;Y.kind="mismatch";Y.node=null;Y.frame=null;Y.message="";return Y;}}}if(G.kind=="type"){var O=N.document.getElementsByTagName(G.nodeType);var Y=new Object();Y.id=G.id;if(O.length==0){Y.kind="none";Y.node=null;Y.frame=null;Y.message="";}else{if(O.length>1){Y.kind="many";Y.node=null;Y.frame=null;Y.message="";}else{Y.kind="ok";Y.node=O[0];Y.frame=N;}}return Y;}if(G.kind=="attributes"){var O=N.document.getElementsByTagName(G.nodeType);if(O.length==0){var Y=new Object();Y.id=G.id;Y.kind="none";Y.node=null;Y.frame=null;Y.message="";return Y;}else{if(O.length==1){var Y=new Object();Y.id=G.id;Y.kind="ok";Y.node=O[0];Y.frame=N;return Y;}else{if(!G.properties||G.properties==null||G.properties.length==0){var Y=new Object();Y.id=G.id;Y.kind="invalid";Y.node=null;Y.frame=null;Y.message="";return Y;}var V=new Array();for(var U=0;U=0&&G.index=O.length){E-=O.length;}}else{E=G.index+((U/2)*-1);if(E<0){E+=O.length;}}}}var P=O[E];var C=hiconversion_attributes(P);var I=0;for(var T=0;T=0){M=M.replace("&","&");}}for(var S=0;S=0){K=K.replace("&","&");}}if(M!=K){continue;}I++;break;}}if(I==G.properties.length){V[V.length]=P;break;}}if(V.length==0){var Y=new Object();Y.id=G.id;Y.kind="none";Y.node=null;Y.frame=null;Y.message="";return Y;}else{if(V.length>1){var Y=new Object();Y.id=G.id;Y.kind="many";Y.node=null;Y.frame=null;Y.message="";return Y;}else{if(V.length==1){if(G.length==null){var Y=new Object();Y.id=G.id;Y.kind="invalid";Y.node=null;Y.frame=null;Y.message="";return Y;}var C=hiconversion_attributes(V[0]);if(C.length!=G.length){var J="length: "+C.length;for(var R=0;R0){J=J+",";}J=J+C[R].name+"="+C[R].value;}var Y=new Object();Y.id=G.id;Y.kind="mismatch";Y.node=null;Y.frame=null;Y.message=J;return Y;}var Y=new Object();Y.id=G.id;Y.kind="ok";Y.node=V[0];Y.frame=N;return Y;}}}var Y=new Object();Y.id=G.id;Y.kind="none";Y.node=null;Y.frame=null;Y.message="";return Y;}}}if(G.kind=="previous"){var H=A.parentNode;var L=0;for(var U=0;U0&&V.length!=G.length){var Y=new Object();Y.id=G.id;Y.kind="mismatch";Y.node=null;Y.frame=null;Y.message="length: "+V.length;return Y;}var F=G.index;if(F<0){if(G.length>0){F=F+G.length;}else{if(V.length>0){F=F+V.length;}}}if(F<0||F>=V.length){var Y=new Object();Y.id=G.id;Y.kind="mismatch";Y.node=null;Y.frame=null;Y.message="length: "+V.length;return Y;}var Y=new Object();Y.id=G.id;Y.kind="ok";Y.node=V[F];Y.frame=N;return Y;}var Y=new Object();Y.id=G.id;Y.kind="invalid";Y.node=null;Y.frame=null;Y.message=G.kind;return Y;}function hiconversion_frame_path(E,F){if(!E||E==null){return"";}var B="";var D=E;while(D!=D.parent){if(D.parent==F){break;}if(D.parent==window){break;}if(!D.name||D.name==null||D.name==""||D.name=="null"){var C=new Object();C.kind="name";C.frame=D;C.message=B;return C;}for(var A=0;A0){var F=new Object();F.kind="script";return F;}var F=new Object();F.kind="ok";return F;}function hiconversion_node_undo(I){if(!I||I==null){return ;}var B=I.node;var F=I.parentNode;var A=I.elements;var C=I.kind;var G=I.previous;var E=I.next;var H=I.hide;if(H){B.style.display="block";hiconversion_node_modify_clean_undo(B);}for(var D=0;D"+I+"";}else{if(A.indexOf(""+I+"";}else{if(A.indexOf(""+I+"";}else{if(A.indexOf(""+I+"";}else{if(A.indexOf(""+I+"";}else{if(A.indexOf(""+I+"";}else{if(A.indexOf(""+I+"";}else{J.depth=0;J.value=I;}}}}}}}var L=C.ownerDocument.createElement("div");L.innerHTML=J.value;for(var G=0;G1){var F=new Object();F.kind="many";F.message="length: "+H;return F;}else{var E=B.tagName.toLowerCase();if(K!=E){var F=new Object();F.kind="mismatch";F.message="tagName: "+K+" childTagName: "+E;return F;}}}}var F=new Object();F.kind="ok";F.elements=new Array();for(var G=0;G")>=0||D.indexOf("")>=0){var C=new Object();C.kind="xml";return C;}var C=new Object();C.kind="ok";return C;}function hiconversion_trim(A){return(A||"").replace(/^\s+|\s+$/g,"");}function hiconversion_body_update(){var C=0;var E=new Date();var B=true;var A=null;var D=hiconversion_body_update_timed(C,E,B,A);}function hiconversion_body_update_timed(D,E,C,A){try{return hiconversion_body_update_timed_helper(D,E,C,A);}catch(B){hiconversion_exception("hiconversion_body_update_timed",B);}}function hiconversion_body_update_timed_helper(L,A,J,K){var F=null;try{F=hiconversion_body_update_helper(L,A);}catch(B){hiconversion_exception("hiconversion_body_update_helper",B);}if(F&&F!=null){if(F.kind=="ok"){var C=hiconversion_document_visible();}else{var I=F.timeout-(new Date()-A);if(F.kind=="find"&&I>0&&typeof J=="boolean"&&J==true){var H=L+1;var G=A;var E=J;var D=F;hiconversion_trace("hiconversion_body_update_timed_helper: re-scheduling timeout: "+F.timeout+" time left: "+I);setTimeout(function(){hiconversion_body_update_timed(H,G,E,D);},100);}else{if(K&&K!=null){hiconversion_send_error(K.frame,K.base,K.pass,K.session,K.responder,K.kind,K.message);}else{hiconversion_send_error(F.frame,F.base,F.pass,F.session,F.responder,F.kind,F.message);}var C=hiconversion_document_visible();}}}return F;}function hiconversion_is_ancestor(B,A){if(!B||B==null){return false;}if(!A||A==null){return false;}var C=B.parentNode;while(C&&C!=null){if(C&&C.tagName&&C.tagName.toLowerCase()==A.toLowerCase()){return true;}C=C.parentNode;}return false;}function hiconversion_body_update_helper(pass,start){var priorityKey="hiconversion_priority";var responderKey="hiconversion_responder";var sessionKey="hiconversion_session";var timeout=1000;var base="";var changes=new Array();var goals=new Array();var priority=null;var session=null;var responder=null;var created=false;var baseline=false;var crossdomain=false;var url=null;var urlUnset=false;var page="";var combination="";var browser="";var platform="";var bridge=false;var callbacks=new Array();base="http://www.hiconversion.com";session="D26AF1BACABE922BC1C731CFEF1C5C08.worker2";urlUnset=true;try{if(priority&&priority!=null&&priority!=""){var priorityCookieValue=hiconversion_cookie_get(priorityKey);if(priority!=priorityCookieValue){hiconversion_cookie_set(priorityKey,priority);}}hiconversion_trace("hiconversion_body_update: entering");if(document.URL.indexOf("https://")==0&&base.indexOf("http://")==0){base="https://"+base.substring("http://".length,base.length);}if(typeof urlUnset=="boolean"&&urlUnset==true){var include=document.getElementById("hiconversion_head_include");if(include&&include!=null&&include.src&&include.src!=null){if(document.URL.indexOf("https://")==0&&include.src.indexOf("http://")==0){var data=new Object();data.frame=window;data.base=base;data.pass=pass;data.session=session;data.responder=responder;data.kind="secure";data.timeout=timeout;data.message="";return data;}else{var data=new Object();data.frame=window;data.base=base;data.pass=pass;data.session=session;data.responder=responder;data.kind="referer";data.timeout=timeout;data.message="";return data;}}else{var data=new Object();data.frame=window;data.base=base;data.pass=pass;data.session=session;data.responder=responder;data.kind="script";data.timeout=timeout;data.message="";return data;}}if(url!=null){var documentUrl=document.URL;var documentUrlHashIndex=documentUrl.indexOf("#");if(documentUrlHashIndex>=0){documentUrl=documentUrl.substring(0,documentUrlHashIndex);}var nohashUrl=url;var nohashUrlIndex=nohashUrl.indexOf("#");if(nohashUrlIndex>=0){nohashUrl=nohashUrl.substring(0,nohashUrlIndex);}if(documentUrl!=nohashUrl){var data=new Object();data.frame=window;data.base=base;data.pass=pass;data.session=session;data.responder=responder;data.kind="cached";data.timeout=timeout;data.message="page mismatch detected for url: "+url;return data;}}var headIncludeFound=0;var headCallFound=0;var bodyCallFound=0;var headInverted=false;var headScripts=new Array();var bodyScripts=new Array();var scripts=document.getElementsByTagName("script");for(var i=0;i0){headInverted=true;}headIncludeFound++;headScripts[headScripts.length]=scripts[i];}else{if(scripts[i].id=="hiconversion_head_script"){headCallFound++;headScripts[headScripts.length]=scripts[i];}else{if(scripts[i].id=="hiconversion_body_script"){bodyCallFound++;bodyScripts[bodyScripts.length]=scripts[i];}}}}for(var j=0;j1){var data=new Object();data.frame=window;data.base=base;data.pass=pass;data.session=session;data.responder=responder;data.kind="enabling";data.timeout=timeout;data.message="hiconversion_body_script count: "+bodyCallFound;return data;}if(headInverted){var data=new Object();data.frame=window;data.base=base;data.pass=pass;data.session=session;data.responder=responder;data.kind="enabling";data.timeout=timeout;data.message="order of head include/script is inverted";return data;}var priorityUrlValue=hiconversion_url_get(priorityKey);var responderUrlValue=hiconversion_url_get(responderKey);var sessionUrlValue=hiconversion_url_get(sessionKey);var priorityCookieValue=hiconversion_cookie_get(priorityKey);var responderCookieValue=hiconversion_cookie_get(responderKey);var sessionCookieValue=hiconversion_cookie_get(sessionKey);var priorityValue=(priorityUrlValue&&priorityUrlValue!=null&&priorityUrlValue!="")?priorityUrlValue:priorityCookieValue;var responderValue=(responderUrlValue&&responderUrlValue!=null&&responderUrlValue!="")?responderUrlValue:responderCookieValue;var sessionValue=(sessionUrlValue&&sessionUrlValue!=null&&sessionUrlValue!="")?sessionUrlValue:sessionCookieValue;var priorityNumber=hiconversion_priority(priorityValue);if(priorityNumber>=0&&priorityNumber<=6){timeout=60000;}if(typeof created=="boolean"&&created==false&&responder&&responder!=null&&responder!=""){if(responderValue&&responderValue!=null&&responderValue!=""){var found=false;var responderValueArray=responderValue.split(".");for(var i=0;icriteria.start&&counter0){goals[k].node=data.elements[0];goals[k].frame=frame;}else{var message="no elements for kind: "+data.kind+" alternate: "+update.id;var data=new Object();data.frame=window;data.base=base;data.pass=pass;data.session=session;data.responder=responder;data.kind="content";data.timeout=timeout;data.message=message;return data;}break;}}}}}}hiconversion_trace("hiconversion_body_update: applying goals: "+goals.length);var converted=false;for(var i=0;i0)?responderValueArray[0]:null;}hiconversion_send_goal(window,base,pass,sessionValue,goalResponder,kind,external,false);converted=true;}}else{if(goal.kind=="script"){try{eval(goal.text);if(typeof hiconversion_goal_user_defined=="function"){var data=hiconversion_goal_user_defined(window,base,pass,session,responder,kind,external);if(data&&data!=null&&data.kind&&data.kind!=null&&data.kind!="ok"){if(!data.message||data.message==null){data.message="unset";}var data2=new Object();data2.frame=window;data2.base=base;data2.pass=pass;data2.session=session;data2.responder=responder;data2.kind="callback";data2.timeout=timeout;data2.message="kind: "+data.kind+" message: "+data.message;return data2;}if(data.elements&&data.elements!=null){hiconversion_trace("hiconversion_body_update: applying goal["+i+"]: callback defined: "+data.elements.length);for(var j=0;j0){var responderArray=new Array();responderArray[responderArray.length]=responder;if(responderValue&&responderValue!=null){var responderValueArray=responderValue.split(".");for(var i=0;i0){sessionValue=session;}var cookies=new Array();if(priorityValue!=null){var cookie=new Object();cookie.name=priorityKey;cookie.value=priorityValue;cookies[cookies.length]=cookie;}if(responderValue&&responderValue!=null){var cookie=new Object();cookie.name=responderKey;cookie.value=responderValue;cookies[cookies.length]=cookie;}if(sessionValue!=null){var cookie=new Object();cookie.name=sessionKey;cookie.value=sessionValue;cookies[cookies.length]=cookie;}hiconversion_trace("hiconversion_body_update: applying cookies: "+cookies.length);for(var i=0;i0)?responderValueArray[0]:null;}}if(!session||session==null){session=sessionValue;}hiconversion_trace("hiconversion_body_update: applying callbacks: "+callbacks.length);var properties=new Array();for(var i=0;i=0;A--){if(C.charAt(A)=="."){B++;if(B==2){return C.substring(A+1);}}}return C;}function hiconversion_host(A){if(!A||A==null){return null;}A=hiconversion_trim(A);var G=A.toLowerCase();if(G.length<4){return null;}if(G.charAt(0)!="h"||G.charAt(1)!="t"||G.charAt(2)!="t"||G.charAt(3)!="p"){return null;}var F="http://";var H=G.indexOf(F);if(H>=0){var D=G.indexOf(":",F.length);if(D>=0){var B=null;var C=G.indexOf("/",F.length);if(C>=0){B=G.substring(D+1,C);}else{B=G.substring(D+1);}if(hiconversion_trim(B)==""){B="80";}return hiconversion_domain(G.substring(F.length,D))+":"+B;}else{var C=G.indexOf("/",F.length);if(C>=0){return hiconversion_domain(G.substring(F.length,C))+":80";}else{return hiconversion_domain(G.substring(F.length))+":80";}}}else{var I="https://";var E=G.indexOf(I);if(E>=0){var D=G.indexOf(":",I.length);if(D>=0){var B=null;var C=G.indexOf("/",I.length);if(C>=0){B=G.substring(D+1,C);}else{B=G.substring(D+1);}if(hiconversion_trim(B)==""){B="443";}return hiconversion_domain(G.substring(I.length,D))+":"+B;}else{var C=G.indexOf("/",I.length);if(C>=0){return hiconversion_domain(G.substring(I.length,C))+":443";}else{return hiconversion_domain(G.substring(I.length))+":443";}}}}return null;}function hiconversion_crossdomain(G,E,T){var A=hiconversion_domain(G.location.hostname.toLowerCase());var H=G.location.port+"";if(hiconversion_trim(H)==""){if(G.location.protocol=="http:"){H="80";}else{if(G.location.protocol=="https:"){H="443";}}}var N=A+":"+H;var J=G.document.getElementsByTagName("a");for(var R=0;R=0){var F=C.indexOf("?");if(F>=0){C=C.substring(0,D)+"&"+B+"="+E+C.substring(D);}else{C=C.substring(0,D)+"?"+B+"="+E+C.substring(D);}}else{var F=C.indexOf("?");if(F>=0){C=C+"&"+B+"="+E;}else{C=C+"?"+B+"="+E;}}return C;}function hiconversion_crossdomain_action(E,A,C,H,F){if(E.indexOf("javascript:")==0){return E;}var B=F&&F!=null&&F.indexOf("ie")==0;var I=A&&A!=null&&A.toLowerCase()=="post";if(B&&!I){var G=E.indexOf("?");if(G>=0){E=E.substring(0,G)+";"+C+"="+H+E.substring(G);}else{var D=E.indexOf("#");if(D>=0){E=E.substring(0,D)+";"+C+"="+H+E.substring(D);}else{E=E+";"+C+"="+H;}}}else{var D=E.indexOf("#");if(D>=0){E=E+"&"+C+"="+H;}else{E=E+"#"+C+"="+H;}}return E;}function hiconversion_remove_by_id(B){var A=document.getElementById(B);if(A&&A!=null){A.parentNode.removeChild(A);}}function hiconversion_document_invisible(){document.write("");document.write("");}function hiconversion_document_visible(){hiconversion_remove_by_id("hiconversion_body_visibility_hidden");hiconversion_remove_by_id("hiconversion_frameset_visibility_hidden");var A=false;var B=document.getElementsByTagName("body");if(B.length>0){if(B[0].style.visibility!="visible"){B[0].style.visibility="visible";A=true;}}else{B=document.getElementsByTagName("frameset");if(B.length>0){if(B[0].style.visibility!="visible"){B[0].style.visibility="visible";A=true;}}}return A;}function hiconversion_document_visible_timeout(){var A=hiconversion_document_visible();hiconversion_trace("hiconversion_document_visible_timeout visible: "+A);}function hiconversion_find_handle_error(D,C,I,G,L,B,F,K){var H=hiconversion_find(D,L);var J=new Date();var M=J-B;if(H.kind=="ok"){if(M>K){var A=(L.length>0)?L[0].id:-1;var E=new Object();E.frame=D;E.base=C;E.session=I;E.responder=G;E.kind="timeout";E.timeout=K;E.message="type: "+F+" elapsed: "+M+" ms id: "+A;return E;}return H;}var E=new Object();E.frame=D;E.base=C;E.session=I;E.responder=G;E.kind="find";E.timeout=K;E.message="type: "+F+" data.kind: "+H.kind+" elapsed: "+M+" message: "+H.message+" id: "+H.id;return E;}function hiconversion_goal(I,B,A,L,J,F,E,K,M,D,H){hiconversion_trace("hiconversion_goal responder: "+F+" kind: "+E+" goal: "+K);I=(I)?I:B.event;if(I&&I!=null&&H&&H!=null&&H.indexOf("safari")>=0){I.stopPropagation();I.preventDefault();try{hiconversion_send_goal(B,A,L,J,F,E,K,false);}catch(C){hiconversion_exception("hiconversion_goal",C);}D.onclick=M;var G=B.document.createEvent("MouseEvents");G.initMouseEvent("click",true,true,B,I.detail,I.screenX,I.screenY,I.clientX,I.clientY,I.ctrlKey,I.altKey,I.shiftKey,I.metaKey,I.button,null);setTimeout(function(){D.dispatchEvent(G);},500);}else{try{hiconversion_send_goal(B,A,L,J,F,E,K,true);}catch(C){hiconversion_exception("hiconversion_goal",C);}if(typeof M=="function"){try{return M(I);}catch(C){hiconversion_exception("hiconversion_goal",C);}}}}function hiconversion_head_update(){var W="hiconversion_priority";var v="hiconversion_responder";var K="hiconversion_session";var A=-1;var V=new Date();var Q="";var R=false;var b=null;var O=null;var c=null;var a=null;var l=false;var D=null;var Z=false;var J=false;var B="";var w="";var I=false;var m=false;Q="http://www.hiconversion.com";a="D26AF1BACABE922BC1C731CFEF1C5C08.worker2";Z=true;try{if(O&&O!=null&&O!=""){var f=hiconversion_cookie_get(W);if(O!=f){hiconversion_cookie_set(W,O);}}hiconversion_trace("hiconversion_head_update: entering");if(document.URL.indexOf("https://")==0&&Q.indexOf("http://")==0){Q="https://"+Q.substring("http://".length,Q.length);}if(typeof Z=="boolean"&&Z==true){hiconversion_trace("hiconversion_head_update: url unset; returning");var S=hiconversion_document_visible();return ;}if(D!=null){var k=document.URL;var F=k.indexOf("#");if(F>=0){k=k.substring(0,F);}var t=D;var e=t.indexOf("#");if(e>=0){t=t.substring(0,e);}if(k!=t){hiconversion_trace("hiconversion_head_update: url mismatch; returning");var S=hiconversion_document_visible();return ;}}var u=0;var U=0;var g=new Array();var L=document.getElementsByTagName("script");for(var r=0;r6){hiconversion_document_invisible();setTimeout(hiconversion_document_visible_timeout,5000);hiconversion_trace("hiconversion_head_update: hiding body/frameset");}}}if(!O||O==null){O=q;}if(!c||c==null){if(E&&E!=null){var d=E.split(".");c=(d.length>0)?d[0]:null;}}if(!a||a==null){a=h;}var N=new Date();var C=N-V;hiconversion_info(N+" hiconversion_head_update\npage: "+B+"\ncombination: "+w+"\nbase: "+Q+"\npriority: "+O+" responder: "+c+"\nsession: "+a+"\ncreated: "+l+"\nbaseline: "+m+"\ncontent: "+J+"\nbridge: "+I+"\ntook: "+C+" ms");}catch(G){hiconversion_exception("hiconversion_head_update",G);var H=hiconversion_exception_to_string(G);hiconversion_send_error(window,Q,A,a,c,"hiconversion_head_update",H);}}function hiconverson_layout(B,A){document.write("");}function hiconversion_onload(L,D,C,M,H,I,O){L=(L)?L:D.event;try{hiconversion_trace("hiconversion_onload: entering");if(typeof O=="function"){try{hiconversion_trace("hiconversion_onload: executing original window.onload");O(L);}catch(E){hiconversion_exception("hiconversion_onload",E);}}var K=0;var A=0;var B=0;var G=document.getElementsByTagName("script");for(var J=0;J0){var A=H.document.createElement("script");A.setAttribute("src",E);A.setAttribute("type","text/javascript");B[0].appendChild(A);if(typeof G=="boolean"&&G==true){var C=new Date();while(new Date().getTime()-C.getTime()<500){}B[0].removeChild(A);}else{setTimeout(function(){B[0].removeChild(A);},500);}D=true;}hiconversion_debug("hiconversion_send_helper: url: "+E+" pass: "+F+" sent: "+D);}