document.write('<script src="http:\/\/www.google-analytics.com\/urchin.js" type="text\/javascript"><\/script>');


/* ---------------------------------------------------
   Get Element by ClassName -------------------------- */
	function getElementsByClassName(oElm, strTagName, oClassNames){
	    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
	    var arrReturnElements = new Array();
	    var arrRegExpClassNames = new Array();
	    if(typeof oClassNames == "object"){
	        for(var i=0; i<oClassNames.length; i++){
	            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
	        }
	    }
	    else{
	        arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
	    }
	    var oElement;
	    var bMatchesAll;
	    for(var j=0; j<arrElements.length; j++){
	        oElement = arrElements[j];
	        bMatchesAll = true;
	        for(var k=0; k<arrRegExpClassNames.length; k++){
	            if(!arrRegExpClassNames[k].test(oElement.className)){
	                bMatchesAll = false;
	                break;                      
	            }
	        }
	        if(bMatchesAll){
	            arrReturnElements.push(oElement);
	        }
	    }
	    return (arrReturnElements)
	}


/* ---------------------------------------------------
   Roll Overs ------------------------------------- */
   
   
	function rollOut() {
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	function MM_preloadImages() {
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	function MM_findObj(n, d) {
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	function rollOver() {
	  var i,j=0,x,a=rollOver.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	
	
/* ---------------------------------------------------
   Send to a Friend ---------------------------------- */
   
   
	function openSend(path_query_url){
		if(document.getElementById("popin")){				
			document.getElementById("container").removeChild(document.getElementById("popin"));
		}
		
		var theHTMLTAG = document.createElement("div");
		theHTMLTAG.id = "popin";
		theHTMLTAG.className = "popin";
		theHTMLTAG.innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="600" id="popIn" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="/flash/send.swf?path_query_url='+path_query_url+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/flash/send.swf?path_query_url='+path_query_url+'" quality="high" bgcolor="#ffffff" wmode="transparent" width="600" height="600" name="popIn" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
		document.getElementById("container").appendChild(theHTMLTAG);

		positionneDiv("popin",600,600);
		document.getElementById("popin").style.display = "block";
	}
   
   function closePopin(which){
		document.getElementById(which).style.display = "none";
   }
   
   function sendEmail(name,email,friendname,friendemail,comments,path_query_url) {
		http.open('get', '/send/send.asp?name='+name+'&email='+email+'&friendname='+friendname+'&friendemail='+friendemail+'&comments='+comments+'&path_query_url='+path_query_url);
		http.onreadystatechange = nothing;
		http.send(null);
   }
   function nothing(){
		if(http.readyState == 4){
			closePopin("popin");
		}
   };
	

/* ---------------------------------------------------
   Center a div in the page  ------------------------- */

	
	var myWidth=0;
	var myHeight=0;
	function positionneDiv(divname,w,h){
		switch(browserName) {
			case "MSIE": if(browserVersion=="7"){ ypos = document.documentElement.scrollTop; break;	}else{	ypos = document.body.scrollTop; break; }
			case "NS": ypos = window.scrollY; break;
			case "Firefox": ypos = window.scrollY; break;
			default: ypos = document.body.scrollTop; break;
		}
		if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		}else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ){ //IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}		
		document.getElementById(divname).style.top = ypos + (myHeight/2) - (h/2) + "px";
		document.getElementById(divname).style.left = (myWidth/2) - (w/2) + 135 +  "px";
	}
	
	
	function getWindowDimension(){
		if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		}else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ){ //IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
	}



/* ----------------------------------------------------
   Browser Detection ---------------------------------- */


	var allow_trans; allow_trans = "1";
	var platformname;
	var browserName;

	function browser_detection() {
		platformname = navigator.platform;
		browserName = whichBrs();	
		browserVersion="0";
		var safari = navigator.appVersion.search(/Safari/);
		if (navigator.appVersion.indexOf("2.")!=-1) { browserVersion="2"; }
		if (navigator.appVersion.indexOf("3.")!=-1) { browserVersion="3"; }
		if (navigator.appVersion.indexOf("5.")!=-1) { browserVersion="5"; }
		if (navigator.appVersion.indexOf("4")!=-1) { browserVersion="4"; if(safari != -1) { browserVersion="100"; } }
		if (navigator.appVersion.indexOf("6.")!=-1) { browserVersion="6"; }
		if (navigator.appVersion.indexOf("7.")!=-1) { browserVersion="7"; }		
		//netsape 6 and 7 returns a 5 but 4.7 is 4.7
		
		if(browserName == "NS"){
			if(parseInt(browserVersion) < 5){
				allow_trans = "0";
			}
		}
	}
	browser_detection();
	

	function whichBrs() {
		var agt=navigator.userAgent.toLowerCase();
		if (agt.indexOf("opera") != -1) return 'Opera';
		if (agt.indexOf("staroffice") != -1) return 'Star Office';
		if (agt.indexOf("beonex") != -1) return 'Beonex';
		if (agt.indexOf("chimera") != -1) return 'Chimera';
		if (agt.indexOf("netpositive") != -1) return 'NetPositive';
		if (agt.indexOf("phoenix") != -1) return 'Phoenix';
		if (agt.indexOf("firefox") != -1) return 'Firefox';
		if (agt.indexOf("safari") != -1) return 'Safari';
		if (agt.indexOf("skipstone") != -1) return 'SkipStone';
		if (agt.indexOf("msie") != -1) return 'MSIE';
		if (agt.indexOf("netscape") != -1) return 'NS';
		if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
		if (agt.indexOf('\/') != -1) {
		if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
		return navigator.userAgent.substr(0,agt.indexOf('\/'));}
		else return 'Netscape';} else if (agt.indexOf(' ') != -1)
		return navigator.userAgent.substr(0,agt.indexOf(' '));
		else return navigator.userAgent;
	}
	
	
/* -------------------------------------------------------------------
   AJAX -------------------------------------------------------------- */
	
	function createRequestObject() {		
		var ro;
		if(browserName == "MSIE"){
			ro = new ActiveXObject("Microsoft.XMLHTTP");
		}else{
			ro = new XMLHttpRequest();
		}
		return ro;
	}
	var http = createRequestObject();



/* -------------------------------------------------------------------
   Validate Form ----------------------------------------------------- */


	function validatePost() {
		Goon="0";
		theerror="";
		if(document.getElementById("newpost_name").value=="") { Goon="1"; theerror+= "Name "; }
		if(document.getElementById("newpost_email").value=="") { Goon="1"; theerror+="Email "; }
		if(document.getElementById("newpost_title").value=="") { Goon="1"; theerror+="Title "; }
		if(document.getElementById("newpost_post").value=="") { Goon="1"; theerror+="Post "; }
		
		if(Goon=="1"){
			document.getElementById("error").innerHTML = "Please fill or the correct the following fields:<br />" + theerror;
		}else{
			newpost_name = document.getElementById("newpost_name").value;
			newpost_email = document.getElementById("newpost_email").value;
			newpost_title = document.getElementById("newpost_title").value;
			newpost_post = document.getElementById("newpost_post").value;
			
			http.open('get', '/submit-a-post/send_post.asp?name='+escape(newpost_name)+'&email='+escape(newpost_email)+'&title='+escape(newpost_title)+'&post='+escape(newpost_post));
			http.onreadystatechange = thankyou;
			http.send(null);
		}
	}
	
	function thankyou(){
		if(http.readyState == 4){
			document.getElementById("error").innerHTML = "Thank you!<br />Your post has been successfully sent.";
			document.getElementById("newpost_name").value="";
			document.getElementById("newpost_email").value="";
			document.getElementById("newpost_title").value="";
			document.getElementById("newpost_post").value="";		
		}
	}

	
	
/* ---------------------------------------------------
   Flash Object -------------------------------------- */
	
	
	/**
	 * FlashObject v1.3d: Flash detection and embed - http://blog.deconcept.com/flashobject/
	 *
	 * FlashObject is (c) 2006 Geoff Stearns and is released under the MIT License:
	 * http://www.opensource.org/licenses/mit-license.php
	 *
	 */
	if(typeof com=="undefined"){var com=new Object();}
	if(typeof com.deconcept=="undefined"){com.deconcept=new Object();}
	if(typeof com.deconcept.util=="undefined"){com.deconcept.util=new Object();}
	if(typeof com.deconcept.FlashObjectUtil=="undefined"){com.deconcept.FlashObjectUtil=new Object();}
	com.deconcept.FlashObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
	if(!document.createElement||!document.getElementById){return;}
	this.DETECT_KEY=_b?_b:"detectflash";
	this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params=new Object();
	this.variables=new Object();
	this.attributes=new Array();
	this.useExpressInstall=_7;
	if(_1){this.setAttribute("swf",_1);}
	if(id){this.setAttribute("id",id);}
	if(w){this.setAttribute("width",w);}
	if(h){this.setAttribute("height",h);}
	if(_5){this.setAttribute("version",new com.deconcept.PlayerVersion(_5.toString().split(".")));}
	this.installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
	if(c){this.addParam("bgcolor",c);}
	var q=_8?_8:"high";
	this.addParam("quality",q);
	var _d=(_9)?_9:window.location;
	this.setAttribute("xiRedirectUrl",_d);
	this.setAttribute("redirectUrl","");
	if(_a){this.setAttribute("redirectUrl",_a);}
	};
	com.deconcept.FlashObject.prototype={setAttribute:function(_e,_f){
	this.attributes[_e]=_f;
	},getAttribute:function(_10){
	return this.attributes[_10];
	},addParam:function(_11,_12){
	this.params[_11]=_12;
	},getParams:function(){
	return this.params;
	},addVariable:function(_13,_14){
	this.variables[_13]=_14;
	},getVariable:function(_15){
	return this.variables[_15];
	},getVariables:function(){
	return this.variables;
	},createParamTag:function(n,v){
	var p=document.createElement("param");
	p.setAttribute("name",n);
	p.setAttribute("value",v);
	return p;
	},getVariablePairs:function(){
	var _19=new Array();
	var key;
	var _1b=this.getVariables();
	for(key in _1b){_19.push(key+"="+_1b[key]);}
	return _19;
	},getFlashHTML:function(){
	var _1c="";
	if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
	if(this.getAttribute("doExpressInstall")){
	this.addVariable("MMplayerType","PlugIn");
	}
	_1c="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
	_1c+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
	var _1d=this.getParams();
	for(var key in _1d){_1c+=[key]+"=\""+_1d[key]+"\" ";}
	var _1f=this.getVariablePairs().join("&");
	if(_1f.length>0){_1c+="flashvars=\""+_1f+"\"";}
	_1c+="/>";
	}else{
	if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
	_1c="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
	_1c+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
	var _20=this.getParams();
	for(var key in _20){_1c+="<param name=\""+key+"\" value=\""+_20[key]+"\" />";}
	var _22=this.getVariablePairs().join("&");
	if(_22.length>0){_1c+="<param name=\"flashvars\" value=\""+_22+"\" />";
	}_1c+="</object>";}
	return _1c;
	},write:function(_23){
	if(this.useExpressInstall){
	var _24=new com.deconcept.PlayerVersion([6,0,65]);
	if(this.installedVer.versionIsValid(_24)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
	this.setAttribute("doExpressInstall",true);
	this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
	document.title=document.title.slice(0,47)+" - Flash Player Installation";
	this.addVariable("MMdoctitle",document.title);}
	}else{this.setAttribute("doExpressInstall",false);}
	if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
	var n=(typeof _23=="string")?document.getElementById(_23):_23;
	n.innerHTML=this.getFlashHTML();
	}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}}};
	com.deconcept.FlashObjectUtil.getPlayerVersion=function(_26,_27){
	var _28=new com.deconcept.PlayerVersion(0,0,0);
	if(navigator.plugins&&navigator.mimeTypes.length){
	var x=navigator.plugins["Shockwave Flash"];
	if(x&&x.description){_28=new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
	}else{
	try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
	for(var i=3;axo!=null;i++){
	axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
	_28=new com.deconcept.PlayerVersion([i,0,0]);}}
	catch(e){}
	if(_26&&_28.major>_26.major){return _28;}
	if(!_26||((_26.minor!=0||_26.rev!=0)&&_28.major==_26.major)||_28.major!=6||_27){
	try{
	_28=new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
	}catch(e){}}}
	return _28;
	};
	com.deconcept.PlayerVersion=function(_2c){
	this.major=parseInt(_2c[0])||0;
	this.minor=parseInt(_2c[1])||0;
	this.rev=parseInt(_2c[2])||0;
	};
	com.deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
	if(this.major<fv.major){return false;}
	if(this.major>fv.major){return true;}
	if(this.minor<fv.minor){return false;}
	if(this.minor>fv.minor){return true;}
	if(this.rev<fv.rev){return false;}
	return true;
	};
	com.deconcept.util={getRequestParameter:function(_2e){
	var q=document.location.search||document.location.hash;
	if(q){var _30=q.indexOf(_2e+"=");
	var _31=(q.indexOf("&",_30)>-1)?q.indexOf("&",_30):q.length;
	if(q.length>1&&_30>-1){
	return q.substring(q.indexOf("=",_30)+1,_31);}}return "";
	},removeChildren:function(n){
	while(n.hasChildNodes()){
	n.removeChild(n.firstChild);}}};
	if(Array.prototype.push==null){
	Array.prototype.push=function(_33){
	this[this.length]=_33;
	return this.length;};}
	var getQueryParamValue=com.deconcept.util.getRequestParameter;
	var FlashObject=com.deconcept.FlashObject;


	
	
/* ---------------------------------------------------
   Movable Type Stuff -------------------------------- */
	
	
// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + (expires ? "; expires=" + expires : "") +
        (path ? "; path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "secure" : "");
    document.cookie = curCookie;
}

function getCookie (name) {
    var prefix = name + '=';
    var c = document.cookie;
    var nullstring = '';
    var cookieStartIndex = c.indexOf(prefix);
    if (cookieStartIndex == -1)
        return nullstring;
    var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
    if (cookieEndIndex == -1)
        cookieEndIndex = c.length;
    return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

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);
}

function rememberMe (f) {
    var now = new Date();
    fixDate(now);
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    now = now.toGMTString();
    if (f.author != undefined)
       setCookie('mtcmtauth', f.author.value, now, '/', '', '');
    if (f.email != undefined)
       setCookie('mtcmtmail', f.email.value, now, '/', '', '');
    if (f.url != undefined)
       setCookie('mtcmthome', f.url.value, now, '/', '', '');
}

function forgetMe (f) {
    deleteCookie('mtcmtmail', '/', '');
    deleteCookie('mtcmthome', '/', '');
    deleteCookie('mtcmtauth', '/', '');
    f.email.value = '';
    f.author.value = '';
    f.url.value = '';
}

function hideDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'none';
}

function showDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'block';
}

var commenter_name;

function individualArchivesOnLoad(commenter_name) {
    if (document.comments_form) {
        if (document.comments_form.email != undefined &&
            (mtcmtmail = getCookie("mtcmtmail")))
            document.comments_form.email.value = mtcmtmail;
        if (document.comments_form.author != undefined &&
            (mtcmtauth = getCookie("mtcmtauth")))
            document.comments_form.author.value = mtcmtauth;
        if (document.comments_form.url != undefined && 
            (mtcmthome = getCookie("mtcmthome")))
            document.comments_form.url.value = mtcmthome;
        if (mtcmtauth || mtcmthome) {
            document.comments_form.bakecookie.checked = true;
        } else {
            document.comments_form.bakecookie.checked = false;
        }
    }
}

function writeTypeKeyGreeting(commenter_name, entry_id) {

}


// Random encryption key feature by Andrew Moulden, Site Engineering Ltd
// This code is freeware provided these four comment lines remain intact
// A wizard to generate this code is at http://www.jottings.com/obfuscator/

var __MTTBLINK__;
var __MTTBID__;
function obfuscator(coded, key, mode, path, hidden) {
	shift = coded.length;
	link = "";
	
	for(i=0;i<coded.length;i++) {
		if (key.indexOf(coded.charAt(i))==-1) {
			ltr = coded.charAt(i);link+=(ltr);
		} else {
			ltr = (key.indexOf(coded.charAt(i)) - shift + key.length) % key.length;
			link += (key.charAt(ltr));
		}
	}
	if(mode == 'hidden_input') {
		document.write('<input type="hidden" name="CCode" value="' + link + '" />');
	} else if(mode == '__MTTBLINK__') {
		__MTTBLINK__ = path + link;
		if(hidden) return;
		document.write(link);
	} else if(mode == '__MTTBID__') {
		__MTTBID__ = link;
		if(hidden) return;
		document.write(link);
	}
}
