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;";
}
function ShowEditBlock(block) {block.className = "EditableContentBorderOn";}
function HideEditBlock(block) {block.className = "EditableContentBorderOff";}
var doneredirect = false;
function EditContent(name) {if (doneredirect==false){doneredirect=true;location='editpage.aspx?contentname=' + name;}}
function PopIt(url) {newwindow=window.open(url,'name','height=400,width=200,resizeable=0,status=0,toolbar=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';
   }
}
//
String.prototype.startsWith = function(str){return (this.match("^" + str) == str)}
String.prototype.endsWith = function(str){return (this.match(str + "$") == 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(){window.location=this.getAttribute('dest');}


