if(typeof(window.tagthis_send) == "undefined"){ // should prevent redefining function but no? //alert('Angkorwattours.net'); function tagthis_send1(textfield,j,tagurl){ if (typeof(tagurl)=="undefined" || tagurl ==""){ tagurl = window.location.href; } if(textfield.value == ""){ alert ("Type a tag into the input box first"); } else { newtag=URLEncode(textfield.value); safeurl = URLEncode(tagurl); //alert("Tagging "+safeurl); extjs='http://i.tagthis.info/addtag.php?url='+safeurl+'&divnum='+j+'&tag='+newtag; var script=document.createElement('script'); script.src=extjs; var headnode = document.getElementsByTagName('head')[0]; headnode.appendChild(script); textfield.value=""; } } function gE(te){ return document.getElementById(te); } function URLEncode(plaintext) { // The Javascript escape and unescape functions do not correspond // with what browsers actually do... var SAFECHARS = "0123456789" + // Numeric "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + // Alphabetic "abcdefghijklmnopqrstuvwxyz" + "-_.!~*'()"; // RFC2396 Mark characters var HEX = "0123456789ABCDEF"; var encoded = ""; for (var i = 0; i < plaintext.length; i++ ) { var ch = plaintext.charAt(i); if (ch == " ") { encoded += "+"; // x-www-urlencoded, rather than %20 } else if (SAFECHARS.indexOf(ch) != -1) { encoded += ch; } else { var charCode = ch.charCodeAt(0); //test for unicode chars - can't urlencode them if (charCode > 255) { encoded += "+"; } else { encoded += "%"; encoded += HEX.charAt((charCode >> 4) & 0xF); encoded += HEX.charAt(charCode & 0xF); } } } // for return encoded; }//function function array_search(val, arr){ var i = arr.length; while (i--) if (arr[i] && arr[i] === val) break; return i; } function maketagthisform(tagged_url){ var i = 0; var divname = 'tagthis_formdiv'; while (gE(divname+i)){ i++; }//while document.write('\n
\n'+ 'Hosted tags for this page from TagThis.Info
\n'+ '
\n'+ '\n'+ '\n'+ '
'+ 'Tags: angkor wat tours angkor wat travel angkor tours angkor wat tour packages tours angkor wat cambodia angkor temples tours angkor ruins cambodia tours to angkor wat tours around angkor cambodia travel to angkor wat angkor thom tours angkor package tours angkor travel guide angkor travel deals tours in angkor wat sunset at angkor wat sunrise at angkor wat angkor cambodia travel travel angkor wat \n
\n'); }//function }//if maketagthisform('Angkorwattours.net');