﻿function test(){
alert("bla");
}

function loc(id) 
{ 
var l = 'loca'+'tion'; 
var h = 'href'; 
var p = '.'; 
var x = '="http://www'+'.shapeshi'; 
var y = 'ftermedia'+'.com'; 
var z = id+'.html";'; 
eval(l+p+h+x+y+z); 
}


function locext(id) 
{ 
var l = 'win'+'dow'; 
var h = 'open'; 
var p = '.'; 
var x = '("'; 
var z = id+'");'; 
eval(l+p+h+x+z);
}


// "type" defines wether to use the start or end of the "<a>"-Tag
// type=front 	: <a href="/dir/anchor.html" target="_top" title="title">
// type=back  	: </a>
// title		: Link Title Tag
// path			: path/to/ -> if none use ''
// file			: filename WITHOUT .html-ending (alter document extension in the script) -> if link goes to a directory, ommit "file" in function call (e.g. jsLoc('front','title,','/path/');

// Execution : <script language="javascript" type="text/script">jsLoc('front','my linktitle','/path/to/my/','file');</script>Anchortext/Image<script language="javascript">jsLoc('back');</script>
//



function jsLoc(type,cssclass,title,path,file){
	if (type == 'front'){
		var dom1 = 'ht';
		var dom2 = 'tp://w';
		var dom3 = 'ww.';
		var dom4 = 'shapeshi';
		var dom5 = 'ftermedia.';
		var dom6 = 'com';
		var ext = '.html';
		if (!file){ 
        	var url = dom1+dom2+dom3+dom4+dom5+dom6+path; 
      	}else{ 
         	var url = dom1+dom2+dom3+dom4+dom5+dom6+path+file+ext;
      	} 
      	document.write('<a class=\"'+cssclass+'\" href=\"'+url+'\" target=\"_top\" title=\"'+title+'\">'); 
  	 }else{ 
      	document.write('</a>'); 
      }
}

