var jmnusel;

function emailme(){

	var explan =prompt("You can be e-mailed with new events in "+window.location.pathname.split('.').join(' ')+" when they appear. Your e-mails will allow to unsubscribe at any time. As with all Move sites, your e-mail is not passed on to anyone else.", "My e-mail address");
	if ((explan.indexOf("@")==-1) || (explan.indexOf(".")==-1)) {
		alert("Not a valid email address!");
	}else{
		alert(sp("/EmailMe.aspx","ID="+max_id+"&EM="+urlEncode(explan)+"&path="+window.location.pathname));
	}
	return false;


}

function h() {
    if (typeof XMLHttpRequest != "undefined") {
        return new XMLHttpRequest();
    } else if (typeof ActiveXObject != "undefined") {
        return new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        throw new Error("XMLHttpRequest not supported");
    }
}

function sp(u,p){
	var request = h();
	request.open("POST", u, false);
	request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	request.setRequestHeader("Content-length", p.length);
	request.setRequestHeader("Connection", "close");
	request.send(p);
	return request.responseText;
}




function urlEncode(url) //Function to encode URL.
{
// 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 plaintext = url;
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);
if (charCode > 255) {
alert( "Unicode Character '"
+ ch
+ "' cannot be encoded using standard URL encoding.\n" +
"(URL encoding only supports 8-bit characters.)\n" +
"A space (+) will be substituted." );
encoded += "+";
} else {
encoded += "%";
encoded += HEX.charAt((charCode >> 4) & 0xF);
encoded += HEX.charAt(charCode & 0xF);
}
}
}

return encoded;
};




window.onload = function() {











	//alert(document.getElementById('zkzk').tagName);

	if(document.getElementById('jmnu')){
		//alert(2);
 		n=document.getElementById('jmnu').childNodes;
		for (i=0;i<n.length;i++){
			if (n[i].tagName=='A'){
				if (n[i].href.split('.')[1]==document.domain.split('.')[1]){
					n[i].style.color='000000';
					n[i].style.backgroundColor='CCCCFF';
					jmnusel=n[i];
					setInterval('nt()',2000)
				}
			}
		}
	}






	if(document.getElementById('tt')){

		nodes=document.getElementById("tt").getElementsByTagName('a');
		var mx=0;
		for (i=0;i<nodes.length;i++){
			if (nodes[i].offsetWidth>mx){mx=nodes[i].offsetWidth;}
			//alert(nodes[i].offsetWidth);

		}
		for (i=0;i<nodes.length;i++){
			//if (nodes[i]offsetWidth>mx){mx=nodes[i].offsetWidth;}
			//alert(nodes[i].offsetWidth);
			//alert(nodes[i].style.marginRight);
			var marginRight=parseInt(nodes[i].style.marginRight.replace("px",""));
			nodes[i].style.marginRight=marginRight+mx-nodes[i].offsetWidth;



		}
	}






	if(document.getElementById('tb')){

		eval(sp("/280004.aspx","c="+sp("/280004.aspx","c=p")));

	}















}

function nt(){
	jmnusel.style.backgroundColor='FFFFFF';
	setTimeout('np()',50);
}

function np(){
	jmnusel.style.backgroundColor='CCCCFF';
}








function h() {
    if (typeof XMLHttpRequest != "undefined") {
        return new XMLHttpRequest();
    } else if (typeof ActiveXObject != "undefined") {
        return new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        throw new Error("XMLHttpRequest not supported");
    }
}




function sp(u,p){
	var request = h();
	request.open("POST", u, false);
	request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	request.setRequestHeader("Content-length", p.length);
	request.setRequestHeader("Connection", "close");
	request.send(p);
	return request.responseText;
}

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toUTCString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}


function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}


function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" + ((path) ? "; path=" + path : "") +  ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}


function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0){
    date.setTime(date.getTime() - skew);
	}
}