// Tricky huh? I change the path to my files using this global include file.
// Also, I protect it from being used by other sites by simply doing a check on the domain each time this file is loaded.
// I'm sure there are workarounds but this at least makes it a bit harder to hot link.
// Yeah I want the files to be spread and downloaded freely but I don't want to pay for the extra bandwidth!
// I can see that you understand now so I'll just stop here. =)

checker=top.location.href.substring(0,25);
if (checker.indexOf("file:///")==-1 && checker.indexOf("worldspace.nu")==-1){
	top.location.href="http://www.worldspace.nu/";
	alert("Sorry but please host the files yourself if you want them on your site.");
}

cata="2384911293652072431264623172011042312641238172---_please_do_not_hot_link_this_file_---58972341310363";

function link(kat,tema){
	STR='<body link="#0000ff" alink="#00bb00" vlink="#5500aa" text="#000000"><style type="text/css">td{background:#ffffff;}</style>';
	if (kat==1){
		STR+='<tt>&lt;</tt> <a href="index.html">Category index</a> <tt>&lt;</tt> <a href="../index.html">Return to index of '+tema+'</a> <tt>&lt;</tt> <a href="../../index.html">Return to main</a>';
	}else{
		STR+='<tt>&lt;</tt> <a href="index.html">Return to index of '+tema+'</a> <tt>&lt;</tt> <a href="../index.html">Return to main</a>';
	}
	perL=top.location.href.substring(0,top.location.href.indexOf("#"));
	if(perL==''){perL=top.location.href;}
	STR+='<br><i>Permanent link to this object </i>»<i> <a href="'+perL+'">'+perL+'</a></i>';
	document.write(STR);
	//document.write('<fieldset style="position:absolute;bottom:2%;left:5%;z-index:-1;width:728px;border:1px solid #66bbbb;padding:5px;font-family:arial;font-weight:bold;font-size:12px;color:#228888;background:#ffffff;"><legend>(^_^)</legend>'+
	//'<img src="trans.gif" height="5" width="1"><br><iframe src="http://www.worldspace.nu/fun.html" width="728" height="90" frameborder="0" border="0" scrolling="no"></iframe><br><iframe src="http://www.worldspace.nu/fun2.html" width="728" height="15" frameborder="0" border="0" scrolling="no"></iframe><br>'+
	//'<table border="0" width="728" cellspacing="0" cellpadding="0"><tr><td><iframe src="http://www.worldspace.nu/fun4.html" width="468" height="60" frameborder="0" border="0" scrolling="no"></iframe></td><td align="right"><iframe src="http://www.worldspace.nu/fun5.html" width="234" height="60" frameborder="0" border="0" scrolling="no"></iframe></td></tr></table></fieldset>');
}

function watch(kat,file,ww,hh,clr,bsize,bgc){
	STR='<html><head><title>Watching "'+file+'"</title></head><body bgcolor="#'+bgc+'"><center><embed src="../';
	if (kat==1){
		STR+='../';
	}
	STR += cata+'/'+file+'" width="'+ww+'" height="'+hh+'" style="border:'+bsize+'px solid #'+clr+';" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></center>';
	document.write(STR);
}

function get(kat,file){
	STR='<title>Getting "'+file+'"</title>Right click on the link below and choose "Save target as..." in order to save it to your hard drive.<dir><a href="../';
	if (kat==1){
		STR+='../';
	}
	STR += cata+'/'+file+'">'+file+'</a></dir>Please do not hot link this file from other sites. The file path will change now and then so it won\'t work.<br><br><i>If you wish to link to this file from your site, press back in your browser and use the permanent link displayed at the top of the page.</i>';
	document.write(STR);
}

function listen(kat,toWhat,typ){
	path = '../';
	if (kat==1){
		path+='../';
	}
	path+=cata+'/'+toWhat;
	if (typ==1){
		stringen='The Monkeys are Listening...</title><bgsound src="'+path+'" loop="1"></bgsound></head><body style="margin:0px;color:black;"><table border="0" width="100%" height="100%"><tr><td align="center"><tt>'+toWhat+'</tt><br><br>Can\\\'t hear anything?<br><a href="'+path+'" title="This is a keeper!" style="color:blue;">Download</a>';
	}else{
		stringen=':: '+ toWhat+' :: </title></head><body style="margin:0px;color:black;"><table border="0" width="100%" height="100%"><tr><td align="center"><embed src="'+path+'" width="225">';
	}
	window.open('javascript:document.write(\'<html><head><title>'+stringen+'</td></tr></table></body></html>\');','WSlisten','top='+(screen.availHeight/2-90)+',left='+(screen.availWidth/2-175)+',width=300,height=90,status=1,resizable=1');
}

function play(kat,file,ww,hh,bgc,typ){
	if (typ==1){
		pis='http://www.microsoft.com/Windows/MediaPlayer/';
	}else if (typ==2){
		pis='http://www.real.com/player/';
	}else{
		pis='http://www.apple.com/quicktime/download/';
	}
	STR='<html><head><title>Playing "'+file+'"</title></head><body bgcolor="#'+bgc+'"><table border="0" width="100%" height="100%"><tr><td align="center"><embed src="../';
	if (kat==1){
		STR+='../';
	}
	STR += cata+'/'+file+'" width="'+ww+'" height="'+(hh+90)+'" pluginspace="'+pis+'" autoplay="no" bgcolor="#'+bgc+'"></embed><br><br></td></tr></table>';
	document.write(STR);
}