var site = '';

if (location.href.indexOf('iamjacksbrain.com') < 0) {
	site = 'http://www.iamjacksbrain.com';
}

// favorite icon for everybody
document.writeln('<link rel="icon" href="' + site + '/favicon.ico" />');
document.writeln('<link rel="Shortcut Icon" href="' + site + '/favicon.ico" />');
// -------------------------------------------------------------------------------------------------- //

// favorite icon for everybody
document.writeln('<link type="application/rss+xml" rel="alternate" title="Updates from Jack\'s Brain" href="http://www.iamjacksbrain.com/IamJacksRSS.xml" />');
// -------------------------------------------------------------------------------------------------- //

// right header links for everybody
function WriteHeaderRight() {
	document.writeln('<a href="' + site + '/AboutMe.html" class="HeaderLink" title="The wet squishy details">About Jack\'s Brain</a>');
//	document.writeln('<a href="mailto:iamjacksbrain@yahoo.com" class="HeaderLink" title="Comments, Suggestions">iamjacksbrain@yahoo.com</a>');
}
// -------------------------------------------------------------------------------------------------- //

// remove frames
if (window != top) {
	top.location.href = location.href;
}
// -------------------------------------------------------------------------------------------------- //

// discourage use of generic domain
var URL;
URL = location.href;
if (URL.indexOf("http://d4718861.h80.hdwindows4.com") != -1) {

	alert("Please update your link to use http://www.iamjacksbrain.com");
	URL = URL.replace(/http:\/\/d4718861.h80.hdwindows4.com/i, "http://www.iamjacksbrain.com");
	this.location.href = URL;
}
// -------------------------------------------------------------------------------------------------- //

// DisplayPeople for everybody
function DisplayPeople(Person) {

	PeopleWindow=window.open('/BadInfluences.html#' + Person,'PeopleWindow','width=300,height=300,scrollbars=yes');
	PeopleWindow.focus();

}
// -------------------------------------------------------------------------------------------------- //

// comments for everybody
function yaccs_c(){document.write(ycso[0]);}
function ycs(e){for(i=0;i<ycso[2];i++){
if(ycsx[i*2]==e){return ycsx[(i*2)+1];}}
if(e<ycso[3])if(ycso[2]>=ycso[1])
{return -1}else{return 0}else return 0}
quot="'";quotcq="','"
function get_comment_link(e){
cc=ycs(e);if(cc==0){yfs=ycso[9]} 
if(cc==1){yfs=ycso[10]}if(cc>1){yfs=ycso[11]; 
if(ycso[13]){yfs+=cc}yfs+=ycso[12]}if(cc==-1){yfs=ycso[14]}
if(ycso[5]){document.write('<a target="'+ycso[4]+
'" class="yaccslink" href="javascript:void(0)"'+
' onclick="window.open('+quot+'http://'+ycso[8]+ 
'commentsn/blog_id='+ycso[15]+'_and_blog_entry_id='+e+quotcq+
'yaccs'+quotcq+'scrollbars=yes,resizable=yes,height='+ 
ycso[6]+',width='+ycso[7]+',left=80,top=80'+quot+');" title="Comment on this post">'+
yfs+'<\/a>')}else{ 
document.write('<a class="yaccslink" href="http://'+ycso[8]+ 
'commentsn?blog_id='+ycso[15]+ ycso[16] +
'blog_entry_id='+e+ ycso[16] +'returnurl='+document.URL+'">'+yfs+'<\/a>')}}
function get_custom_comment_link(e,f,g,h,m,n,o,p,q,r){get_comment_link(e)}
function yaccs(e,f,g,h,m,n,o,p,q,r,ar){get_comment_link(e)}
// -------------------------------------------------------------------------------------------------- //

// EasyPopup for everybody
//The majority of this script came from: CodeLifter.com Copyright 2003

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

if (parseInt(navigator.appVersion.charAt(0))>=4) {
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
	var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
	var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

	function popImage(imageURL, imageTitle, Caption) {
		if (isNN){imgWin=window.open('about:blank','',optNN);}
		if (isIE){imgWin=window.open('about:blank','',optIE);}
		with (imgWin.document){
		writeln('<html><head><title>Loading...</title>');
		writeln('<style type="text/css">');
		writeln('body {margin:0px;}');
		writeln('a.caption {text-decoration: none;}');
		if (isIE){
			writeln('a.caption:hover {background: #FFFFFF;}');
		}
		writeln('a.caption span {display: none;}');
		writeln('a.caption:hover span {display: block; color: #000000; background: #FFFFCC; font: 12px arial, sans-serif; text-align: center; ');
		writeln('position: absolute; top: 100px; ');
		writeln('left: 40; width: 150px; padding: 5px 5px 5px 5px; z-index: 100; border-top: 2px solid #9B9BFF; border-right: 2px solid #000080; border-bottom: 2px solid #000080; border-left: 2px solid #9B9BFF;}');
		//writeln('left: 40; width: 150px; padding: 5px 5px 5px 5px; z-index: 100; border: 2px outset #000080;}');
		writeln('</style>');
		writeln('<link rel="stylesheet" type="text/css" href="/lib/pagestyle.css">')
		writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');
		writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');
		writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');
		writeln('if (isIE){');
		writeln('window.resizeTo(100,100);');
		writeln('width=100-(document.body.clientWidth-document.images[0].width);');
		writeln('height=100-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,height);}');
		writeln('if (isNN){');
		writeln('window.innerWidth=document.images["DisplayImage"].width;');
		writeln('window.innerHeight=document.images["DisplayImage"].height;');
		writeln('}}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</sc'+'ript>');
		writeln('</head><body bgcolor="#000000" scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
		if (Caption != '') {
			writeln('<a class="caption" href="javascript:self.close()"><img name="DisplayImage" src="'+imageURL+'" style="display:block" border="0"><span>'+Caption+'</span></a>');
		} else {
			writeln('<img name="DisplayImage" src='+imageURL+' style="display:block" border="0">');
		}
		writeln('</body></html>');
		close();
	}
}
// -------------------------------------------------------------------------------------------------- //

// depreciated ImagePopup script
function WriteContent(ImageSrc, Caption, IHeight, WHeight, IWidth, WWidth, BGColor,FntColor) {

	var browser= (n && parseFloat(navigator.appVersion)>=4.07)

	textWindow=window.open("/lib/blank.html","textWindow","width=" + WWidth + ",height=" + WHeight + "\",resizable=yes,scrollbars=auto");
	textWindow.document.writeln("<html>")
	textWindow.document.writeln("<head>")
	textWindow.document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"/lib/pagestyle.css\">")
	var n = ((document.layers) && (parseFloat(navigator.appVersion) >= 4.07) && (parseFloat(navigator.appVersion) < 5)) ? 1:0;
	if (n == false) {
		textWindow.document.writeln("<style type=\"text/css\">")
		textWindow.document.writeln("body { margin-top : 10px; }")
		textWindow.document.writeln("</style>")
	}
	textWindow.document.writeln("</head>")
	textWindow.document.writeln("<body bgcolor=\"" + BGColor + "\" marginheight=\"6\" marginwidth=\"8\" leftmargin=\"2\" topmargin=\"3\">")
	textWindow.document.writeln("<div align=\"center\"><img src=\"" + ImageSrc + "\" height=\"" + IHeight + "\" width=\"" + IWidth + "\" border=\"0\"></div><br>")
	textWindow.document.writeln("<div class=\"Caption\"><font color=\"" + FntColor + "\">" + Caption + "</font></div>")
	textWindow.document.writeln("</body>")
	textWindow.document.writeln("</html>")
	textWindow.document.close()
	setTimeout('textWindow.focus();',250);

	if (n == true) {
		myImage = new Image()
		myImage.src = ImageSrc
		setTimeout('NSDisplay();',1000);
	}
}

function NSDisplay() {
textWindow.document.images[0].src = myImage.src
}
// -------------------------------------------------------------------------------------------------- //


