function __doExternalPost(targetUrl) {
   theForm.__VIEWSTATE.value = "";
   theForm.encoding = "application/x-www-form-urlencoded";
   theForm.action = targetUrl;
   theForm.submit();
}
function getCookie(sName) {
	var cookie = "" + document.cookie;
	var start = cookie.indexOf(sName);
	if (cookie == "" || start == -1) 
		return "";
	var end = cookie.indexOf(';',start);
	if (end == -1)
		end = cookie.length;
	return unescape(cookie.substring(start+sName.length + 1,end));
}
function setCookie(sName, value) {
	document.cookie = sName + "=" + escape(value) + ";path=/;expires=Fri, 1 Jan 2010 00:00:00 GMT;";
}
var doneredirect = false;
function EditContent(name) {if (doneredirect==false){doneredirect=true;location='editpage.aspx?contentname=' + name;}}
function PopIt(url) {return PopItEx(url,250,400);}
function PopItEx(url,w,h) {newwindow=window.open(url,'name','height='+h+',width='+w+',resizable=1,status=0,toolbar=0,location=0,scrollbars=0,menubar=0');if (window.focus) {newwindow.focus()}	return false;}
function toggleDiv(divid){
   if(document.getElementById(divid).style.display == 'none'){
      document.getElementById(divid).style.display = 'block';
   }else{
      document.getElementById(divid).style.display = 'none';
   }
}
function toggleDivVisibility(divid)
{
   if(document.getElementById(divid).style.visibility == 'visible'){
      document.getElementById(divid).style.visibility = 'hidden';
   }else{
      document.getElementById(divid).style.visibility = 'visible';
   }
}
//
String.prototype.startsWith = function(str){return (0==this.indexOf(str));}
function addLoadEvent(func) { 
  var oldonload = window.onload; 
  if (typeof window.onload != 'function') { 
    window.onload = func; 
  } else { 
    window.onload = function(){if (oldonload) {oldonload();}func();} 
  } 
} 
addLoadEvent(findJakes);
function findJakes(){
	var Jakes = document.getElementsByTagName('span');
	if(Jakes.length > 0){
		for(var i=0;i<Jakes.length;i++){
		    if (Jakes[i].className.startsWith('Jake')) {
		        Jakes[i].onmouseout = JakeMouseOut;
		        Jakes[i].onmouseover = JakeMouseOver;
		        Jakes[i].onclick = JakeClick;
		    }
		}
	}
}
function JakeMouseOver(){this.className = 'Jake-hover';}
function JakeMouseOut(){this.className = 'Jake';}
function JakeClick(){var u=this.getAttribute('dest');if(!u.startsWith('/') && !u.startsWith('http'))u='/'+u;window.location=u;}

