/* all independent javascript functions */

/* used in global header */
function skopos () {
document.write("<scr" + "ipt language=\"JavaScript\" src=\"http://www.skopos1.de/s/sps.php?s=7\" type=\"text/javascript\";></scr" + "ipt>");
}
//skopos();

/* used in global_header.php */
function rnd() {	
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
};

/* used in global_header.php */
function rand(number) {	
        return Math.ceil(rnd()*number);
};

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

/* used in global_header.php */
function guidedtour_head(url,height) {	
win2=window.open(url,"pathwin","width=640,height="+height+",scrollbars=no,status");
win2.focus();
}

/* used in home.php */
function guidedtour(url,height) {
win2=window.open(url,"pathwin","width=640,height="+height+",scrollbars=no,status");
win2.focus();
}

/* used in global_header.php */
function launch(newURL, newName, newFeatures, orgName) {	
var remote = open(newURL, newName, newFeatures);
if (remote.opener == null)
remote.opener = window;
remote.opener.name = orgName;
return remote;
}

/* used in global_header.php */
function launchRemote(poppler,host) {

myPrice=open("","myPrice","width=250,height=250,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no");

if (myPrice.opener == null)
myPrice.opener = window;
myPrice.opener.name = "headerbox";

myPrice.document.open("text/html","replace");
myPrice.document.write("<html>\n<head>\n");
myPrice.document.write("<title>www.dooyoo.co.uk</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"http://img.dooyoo.com/DE_DE/css/popup.css\">\n</head>\n<body>\n<div class=\"msgbox\">\n");

if (poppler == 1) {
myPrice.document.write("<b style=\"color:#3cb93f\">The best product</b><br><br>\n");
myPrice.document.write("You find the best product - quickly, easily and<br>reliably.<br><br>\nTop lists, curent sales rankings and consumer reviews ensure you make the right choice. <br><br>\nFind your desired product here:<br>\n<b>PRODUCT SEARCH</b><br>\n");
myPrice.document.write("<form action=\""+host+"/search\" method=\"get\" target=\"headerbox\" onsubmit=\"setTimeout(\'window.self.close()\',3000)\" style=\"display:inline;\">\n");
myPrice.document.write("<input type=\"text\" name=\"term\" value=\"\" size=\"14\" style=\"width:146px\">\n<input type=\"image\" src=\"http://img.dooyoo.net/aurora_pix/go.gif\" border=\"0\">\n<input type=\"hidden\" name=\"rest\" value=\"\">\n</form>");
}
if (poppler == 2) {
myPrice.document.write("<b style=\"color:#3cb93f\">The best price</b><br><br>\n");
myPrice.document.write("Find the best price - in one click.<br><br>\nPrices of the most important and most reliable shops on the net are listed with us.<br><br>\nFind the best price for your desired product here:<br><b>PRICE SEARCH</b><br>\n");
myPrice.document.write("<form action=\""+host+"/search\" method=\"get\" target=\"headerbox\" onsubmit=\"setTimeout(\'window.self.close()\',3000)\" style=\"display:inline;\">\n");
myPrice.document.write("<input type=\"hidden\" name=\"rest\" value=\"prices\">\n<input type=\"text\" name=\"term\" value=\"\" size=\"14\" style=\"width:146px\">\n<input type=\"image\" src=\"http://img.dooyoo.net/aurora_pix/go.gif\" border=\"0\">\n</form>\n");
}
if (poppler == 3) {
myPrice.document.write("<b style=\"color:#3cb93f\">The best shop</b><br><br>\n");
myPrice.document.write("Find the best shop for your needs.<br>Read reviews and recommendations on a vast range of stores. Reliability and a good price are garunteed.<br><br>\n");
myPrice.document.write("dooyoo Partnershops have cheap and good offers. You will see on our <a href=\""+host+"/dooyoo/partnershop_list/\" target=\"headerbox\" onclick=\"setTimeout(\'window.self.close()\',3000)\">Partnershop List</a> which stores you can trust.\n<br><br>\n");
myPrice.document.write("Find the shops you want to read about here:<br><b>SHOP SEARCH</b><br>\n");
myPrice.document.write("<form action=\""+host+"/search\" method=\"get\" target=\"headerbox\" onsubmit=\"setTimeout(\'window.self.close()\',3000)\" style=\"display:inline;\">\n<input type=\"hidden\" name=\"rest\" value=\"pg-Shops\">\n");
myPrice.document.write("<input type=\"text\" name=\"term\" value=\"\" size=\"14\" style=\"width:146px\">\n<input type=\"image\" src=\"http://img.dooyoo.net/aurora_pix/go.gif\" border=\"0\">\n</form>\n");
}
if (poppler == 31) {
myPrice.document.write("<b style=\"color:#3cb93f\">The best shop</b><br><br>\n");
myPrice.document.write("Find the best shop for your needs.<br>Read reviews and recommendations on a vast range of stores. Reliability and a good price are garunteed.<br><br>\n");
myPrice.document.write("dooyoo Partnershops have cheap and good offers. You will see on our <a href=\""+host+"/shoplist/\" target=\"headerbox\" onclick=\"setTimeout(\'window.self.close()\',3000)\">Partnershop List</a> which stores you can trust.\n<br><br>\n");
myPrice.document.write("Find the shops you want to read about here:<br><b>SHOP SEARCH</b><br>\n");
myPrice.document.write("<form action=\""+host+"/search\" method=\"get\" target=\"headerbox\" onsubmit=\"setTimeout(\'window.self.close()\',3000)\" style=\"display:inline;\">\n<input type=\"hidden\" name=\"rest\" value=\"pg-Shops\">\n");
myPrice.document.write("<input type=\"text\" name=\"term\" value=\"\" size=\"14\" style=\"width:146px\">\n<input type=\"image\" src=\"http://img.dooyoo.net/aurora_pix/go.gif\" border=\"0\">\n</form>\n");
}

myPrice.document.write("</div>\n</body>\n</html>");
myPrice.document.close();
myPrice.focus();
}

/* used in search_products.php sitemap.php prd_nav.php */
function launchDisclaimer(url,host) {
myDisc=open("","myDisc","width=500,height=200,top=100,resizable=yes,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no");

myDisc.document.open("text/html","replace");

myDisc.document.write("<html>\n<head>\n");
myDisc.document.write("<title>www.dooyoo.de</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"http://img.dooyoo.com/DE_DE/css/styles.css\">\n</head>\n");
myDisc.document.write("<body>\n<table width=\"400\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">");
myDisc.document.write("<tr>\n<td colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"16\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td class=\"line_dotted\" colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"16\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td class=\"pgbd\" colspan=\"2\"><b>Disclaimer</b></td>\n</tr>\n<tr>\n<td colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"12\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td align=\"center\" class=\"pgbd\" colspan=\"2\">Die folgenden Seiten enthalten Bilder und Inhalte, die f&uuml;r Kinder und Jugendliche unter 18 Jahren nicht geeignet sind. Bitte best&auml;tigen Sie, ob Sie berechtigt sind, derartige Inhalte anzusehen.</td>\n</tr>\n");
myDisc.document.write("<tr>\n<td colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"16\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td class=\"pgbd\" align=\"left\"><a href=\"\" onclick=\"opener.location.href=\'http://"+host+"\';window.close()\">Ich bin unter 18 Jahre alt</a></td>\n");
myDisc.document.write("<td class=\"pgbd\" align=\"right\"><a href=\"\" onclick=\"opener.location.href=\'http://"+url+"\';window.close()\">Ich bin &uuml;ber 18 Jahre alt</a></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"16\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td class=\"line_dotted\" colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("<tr>\n<td colspan=\"2\"><img src=\"http://img.dooyoo.de/pix/spaceman.gif\" width=\"1\" height=\"16\" border=\"0\" alt=\"\"></td>\n</tr>\n");
myDisc.document.write("</table>\n</body>\n</html>");

myDisc.document.close();
myDisc.focus();
}

/* used in home.php */
function RelaunchOnClick(url,width,height) {	
  window.open(url,'RelaunchOnClick','scrollbars=yes,screenX=50,screenY=50,left=50,top=50,resizable=no,width='+width+',height='+height+',status=no,location=no,toolbar=no');
}

/* used in prd.php, search_external.php */
function exterlink_prdres_overture(url, windowname) {	
var w = 300;
var h = 200;
var LeftPosition = screen.width/2-w/2;
var TopPosition = screen.height/2-h/2;
window.open(url,windowname,'menubar=no,toolbar=no,location=no,width='+w+',height='+h+',left='+LeftPosition+',top=90,status=no,scrollbars=no,resizable=no');
}

/* used in search_external.php */
function exterlink_search_overture(url, windowname) {
var w = 300;
var h = 200;
var LeftPosition = screen.width/2-w/2;
var TopPosition = screen.height/2-h/2;
window.open(url,windowname,'menubar=no,toolbar=no,location=no,width='+w+',height='+h+',left='+LeftPosition+',top=90,status=no,scrollbars=no,resizable=no');
}

/* used in community pages - ws10 - /www/dooyoo/ht!docs/www.dooyoo.com/de/yoo2_community */
function openwin(x) {
url=x;
w=400;
h=400;
centerX = (screen.availWidth-w)/2;
centerY = (screen.availHeight-h)/2;
more = "width="+w+",height="+h;
more += ",screenX="+centerX+",screenY="+centerY;
more += ",left="+centerX+",top="+centerY;
more += ",locationbar=no, scrolbars=no, status=no, toolbar=no, menubar=no";
f1 = open(url,"nuWin",more);
}

function PopupOnClick(url,width,height)
{window.open(url,'PopupOnClick','scrollbars=yes,screenX=100,screenY=100,left=100,top=100,resizable=no,width='+width+',height='+height+',status=no,location=no,toolbar=no');}

function popupxall(url,height) {
win2=window.open(url,"pathwin","width=640,height="+height+",scrollbars=no,status");
win2.focus();
}

function PopUp(url,width,height) {
win2=window.open(url,"pathwin","width="+width+",height="+height+",scrollbars=no,status");
win2.creator=self;
win2.focus();
}

function checkForm(form) {
if (form.submit_by.value.length < 2) {
	alert("Please enter your email address")
	form.submit_by.focus();
	return false;
}
if (form.description.value.length < 2) {
	alert("Please describe the bug")
	form.description.focus();
	return false;
}
}

function isEmail(string) {
if (string.search(/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/) != -1)
return true;
else
alert("Bitte geben Sie eine gueltige Email Adresse an!");
return false;
}

function memorypopup(url, windowname) {
var w = 640;
var h = 460;
var LeftPosition = screen.width/2-w/2;
var TopPosition = screen.height/2-h/2;
window.open(url,windowname,'menubar=no,toolbar=no,location=no,width='+w+',height='+h+',left='+LeftPosition+',top=90,status=no,scrollbars=no,resizable=no');
}

/***************************w3r00l3*******************************/
function w3r00l3 ()
{
	document.write('below is some lovely stuff : w3r00l3');
}

var outchars = new Array(
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
    -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
    -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
function clarify(str) 
{
    var c1, c2, c3, c4;
    var i, len, clarity;

    len = str.length;
    i = 0;
    clarity = "";
    while(i < len) {
	do { c1 = outchars[str.charCodeAt(i++) & 0xff]; } while(i < len && c1 == -1);
	if(c1 == -1)
	    break;
	do { c2 = outchars[str.charCodeAt(i++) & 0xff]; } while(i < len && c2 == -1);
	if(c2 == -1)
	    break;
	clarity += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
	do {
	    c3 = str.charCodeAt(i++) & 0xff;
	    if(c3 == 61)
		return clarity;
	    c3 = outchars[c3];
	} while(i < len && c3 == -1);
	if(c3 == -1)
	    break;
	clarity += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
	do {
	    c4 = str.charCodeAt(i++) & 0xff;
	    if(c4 == 61)
		return clarity;
	    c4 = outchars[c4];
	} while(i < len && c4 == -1);
	if(c4 == -1)
	    break;
	clarity += String.fromCharCode(((c3 & 0x03) << 6) | c4);
    }
    return clarity;
}
function shop_label(bytepool1, bytepool2)
{
	daplace= clarify(bytepool1);
	dalabel= clarify(bytepool2);
	document.write('<');
	document.write('a hr');
	document.write('ef="');
	document.write(daplace);
	document.write('">');
	document.write(dalabel);
	document.write('<');
	document.write('/');
	document.write('a');
	document.write('>');
}
function more_shopping(bytepool)
{
	shopping= clarify(bytepool);
	document.write(shopping);
}
/*******************************w3r00l3 end**********************************/

