function changeLang(language) {
    var myPath = new String(document.URL);
    var myPath2;    
    if (myPath == "http://www.monsterframe.it/" || myPath == "http://www.monsterframe.de/" || myPath == "http://www.monsterframe.eu/" || myPath == "http://www.monsterframe.com/") myPath2 = myPath + language + "/";
    else myPath2 = myPath.replace(/\/..\//, "/" + language + "/");
    if (myPath.search(/\/..\//) == -1) {
    	myPath2 = myPath.substring(0,myPath.indexOf("/",11)+1) + language + myPath.substring(myPath.indexOf("/",11));
    }
    window.location.href = myPath2;
    return false;
}

function redir(towhere, language) {

    switch(towhere) {
    	case "pdf":
    	   myPath = "http://www.monsterframe.com/fileadmin/documents/monsterframe_" + language + ".pdf";
    	   //myPath = "http://www.meran.tv/phpmyvisites/phpmyvisites.php?url=http://www.monsterframe.com/fileadmin/documents/monsterframe_" + language + ".pdf&id=7&pagename=FILE:monsterframe_data.pdf";
    	   break;
    	case "shop":
    	   myPath = "http://www.kdshop.it/" + language + "/monsterframe/page.html";
    	break;
    	case "order":
    	   myPath = "http://www.kdshop.it/" + language + "/singleview/products/365/12508/page.html?swords=monsterframe%20sample";
    	break;
    	case "shop2":
    	   myPath = "http://www.kdshop.it/" + language + "/basket/products/page.html?C=EUR&ttp_basket[12523][quantity]=1";
    	break;
    	case "pdfstopper":
    	   myPath = "http://www.create-surplus.com/fileadmin/documents/stopper.pdf";
    	break;
    	case "pdfzip":
    	   myPath = "http://www.monsterframe.com/fileadmin/documents/lightzip.pdf";
    	break;
	case "pdfblister":
	   myPath = "http://www.fissoblister.com/fileadmin/img/fissoblister_postcard.JPG";
    	break;
	case "orderfullset":
	  myPath = "http://www.kdshop.it/" + language + "/singleview/products/8269/12526/page.html";
    	break;
	case "orderstarterset":
	  myPath = "http://www.kdshop.it/" + language + "/singleview/products/8269/12527/page.html";
    	break;
	case "pdfbannerblock":
	  myPath = "http://www.bannerblock.eu/fileadmin/documents/postkarte_bannerblock_WEB.pdf";
    	break;
	case "orderwallset":
	  myPath = "http://www.kdshop.it/" + language + "/frames_single/products/8045/12528/page.html";
    	break;
	case "orderfloorset":
	  myPath = "http://www.kdshop.it/" + language + "/frames_single/products/8045/12529/page.html";
    	break;
    	case "orderpresstocaps":
	  myPath = "http://www.kdshop.it/" + language + "/basket/products/page.html?C=EUR&ttp_basket[12531][quantity]=1";
    	break;
    	case "orderpresstoshowroom":
	  myPath = "http://www.kdshop.it/" + language + "/basket/products/page.html?C=EUR&ttp_basket[12530][quantity]=1";
    	break;
    	case "orderpressto":
	  myPath = "http://www.kdshop.it/" + language + "/basket/products/page.html?C=EUR&ttp_basket[11915][quantity]=1";
    	break;
		case "presstopdf":
	  myPath = "http://www.pressto.it/fileadmin/documents/pressto.pdf";
    	break;
    }
    var newwindow = window.open(myPath);
}

function lauftext() {
	var bestlen = 94;
	var laufdiv = document.getElementById("fliesstext");
	if (laufdiv) {
	var laufschrift = laufdiv.firstChild;
	var mytext = laufschrift.nodeValue;
	var necChar = 96 - mytext.length;
	for (i=necChar; i > 0; i--) mytext += " .";
	mytext = mytext.substring(0, bestlen);
	mytext += " ";
	laufschrift.nodeValue = mytext;
	setTimeout("lauftextrepeat()", 10); 
	}
} 

function lauftextrepeat() {
	var laufschrift1 = document.getElementById("fliesstext").firstChild;
	var mytext1 = laufschrift1.nodeValue;
	var myChar1 = mytext1.substring(0,1);
	mytext1 = mytext1.substring(1, mytext1.length) + myChar1;
	laufschrift1.nodeValue = mytext1;
	setTimeout("lauftextrepeat()", 160);
}

//setTimeout("lauftext()", 1000);