// if (top != self) top.location = location;

function appendOptionLast(name)
{
    var num=1;

  var elOptNew = document.createElement('option');
  elOptNew.text = 'Append' + num;
  elOptNew.value = 'append' + num;
//  var elSel = document.getElementById('selectX');
  var elSel = document.getElementById(name);

  try {
    elSel.add(elOptNew, null); // standards compliant; doesn't work in IE
  }
  catch(ex) {
    elSel.add(elOptNew); // IE only
  }
}

function removeOptionLast()
{
  var elSel = document.getElementById('selectX');
  if (elSel.length > 0)
  {
    elSel.remove(elSel.length - 1);
  }
}



var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + //all caps
"abcdefghijklmnopqrstuvwxyz" + //all lowercase
"0123456789+/="; // all numbers plus +/=

function addInput(namec,fff,ggg) {
    addInputdo('parah1',fff,ggg);
    addInputdo('parah3',fff,ggg);
    addInputdo('parah4',fff,ggg);
    addInputdo('parah2',fff,ggg);
    addInputdo('parah5',fff,ggg);
}
function addInputdo(namec,fff,ggg) {
    var ns=(document.layers);
    var ie=(document.all);
    var w3=(document.getElementById && !ie);
    if(!ns && !ie && !w3) return;
    if(ie) adDiv=eval('document.all.'+namec);
    else if(ns) adDiv=eval('document.layers['+namec+']');
    else if(w3) adDiv=eval('document.getElementById("'+namec+'")');

    if (namec=='parah1'){
        adDiv.innerHTML+="<input type=\"text\" name=\"ftime[]\" size=\"1\" value=\"\">&nbsp;:&nbsp;<input type=\"text\" name=\"fminuta[]\" size=\"1\" value=\"\"><br>";
    }else if (namec=='parah3'){
        adDiv.innerHTML+="<input type=\"text\" name=\"ftimeto[]\" size=\"1\" value=\"\">&nbsp;:&nbsp;<input type=\"text\" name=\"fminutato[]\" size=\"1\" value=\"\"><br>";
    }else if (namec=='parah4'){
        adDiv.innerHTML+="<input type=\"text\" name=\"fsala[]\" size=\"1\" value=\"\"><br>";
    }else if (namec=='parah5'){
        adDiv.innerHTML+=base64_decode(ggg)+"<br>";
    }else{
        adDiv.innerHTML+=base64_decode(fff)+"<br>";
    }
}




function base64_decode(inp)
{
var out = ""; //This is the output
var chr1, chr2, chr3 = ""; //These are the 3 decoded bytes
var enc1, enc2, enc3, enc4 = ""; //These are the 4 bytes to be decoded
var i = 0; //Position counter
// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
var base64test = /[^A-Za-z0-9\+\/\=]/g;
if (base64test.exec(inp)) { //Do some error checking
alert("There were invalid base64 characters in the input text.\n" +
"Valid base64 characters are A-Z, a-z, 0-9, ?+?, ?/?, and ?=?\n" +
"Expect errors in decoding.");
}
inp = inp.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do { //Here.s the decode loop.
//Grab 4 bytes of encoded content.
enc1 = keyStr.indexOf(inp.charAt(i++));
enc2 = keyStr.indexOf(inp.charAt(i++));
enc3 = keyStr.indexOf(inp.charAt(i++));
enc4 = keyStr.indexOf(inp.charAt(i++));
//Heres the decode part. There.s really only one way to do it.
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
//Start to output decoded content
out = out + String.fromCharCode(chr1);
if (enc3 != 64) {
out = out + String.fromCharCode(chr2);
}
if (enc4 != 64) {
out = out + String.fromCharCode(chr3);
}
//now clean out the variables used
chr1 = chr2 = chr3 = "";
enc1 = enc2 = enc3 = enc4 = "";
} while (i < inp.length); //finish off the loop
//Now return the decoded values.
return out;
}











function checkuncheckAll(FormName, FieldName, CheckValue) {
    if(!document.forms[FormName])
        return;
    var objCheckBoxes = document.forms[FormName].elements[FieldName];
    if(!objCheckBoxes)
        return;

    var countCheckBoxes = objCheckBoxes.length;
    if(!countCheckBoxes)
        objCheckBoxes.checked = CheckValue;
    else
        // set the check value for all check boxes
        for(var i = 0; i < countCheckBoxes; i++){
                if (objCheckBoxes[i].checked==false)
                objCheckBoxes[i].checked = true;
                else    
                objCheckBoxes[i].checked = false;
        }
}


//==========================================
// Check all or uncheck all?
//==========================================
function CheckCheckAll(fmobj) {
  var TotalBoxes = 0;
  var TotalOn = 0;
  for (var i=0;i<fmobj.elements.length;i++) {
    var e = fmobj.elements[i];
    if ((e.name != 'allbox') && (e.type=='checkbox')) {
      TotalBoxes++;
      if (e.checked) {
       TotalOn++;
      }
    }
  }
  if (TotalBoxes==TotalOn) {
    fmobj.allbox.checked=true;
  }
  else {
   fmobj.allbox.checked=false;
  }
}

function checkAll(field)
{
for (i = 0; i < field.length; i++)
    field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
    field[i].checked = false ;
}



function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
    if(!document.forms[FormName])
        return;
    var objCheckBoxes = document.forms[FormName].elements[FieldName];
    if(!objCheckBoxes)
        return;
    var countCheckBoxes = objCheckBoxes.length;
    if(!countCheckBoxes)
        objCheckBoxes.checked = CheckValue;
    else
        // set the check value for all check boxes
        for(var i = 0; i < countCheckBoxes; i++)
            objCheckBoxes[i].checked = CheckValue;
}

function showHideDivbezimg(namec){
//    var d = document.getElementById(divName);
    var ns=(document.layers);
    var ie=(document.all);
    var w3=(document.getElementById && !ie);
    if(!ns && !ie && !w3) return;
    if(ie) adDiv=eval('document.all.'+namec+'.style');
    else if(ns) adDiv=eval('document.layers['+namec+']');
    else if(w3) adDiv=eval('document.getElementById("'+namec+'").style');

    if (ie || w3){
        if (adDiv.display == "none"){
            adDiv.display="block";
        }else{
            adDiv.display ="none";
        }
    }else{
        if (adDiv.display == "none"){
            adDiv.display="visible";
        }else{
            adDiv.display ="none";
        }
    }
}



function showHideDiv(img, namex){
//    var d = document.getElementById(divName);
    var ns=(document.layers);
    var ie=(document.all);
    var w3=(document.getElementById && !ie);
    if(!ns && !ie && !w3) return;
    if(ie) adDiv=eval('document.all.'+namex+'.style');
    else if(ns) adDiv=eval('document.layers['+namex+']');
    else if(w3) adDiv=eval('document.getElementById("'+namex+'").style');

    if (ie||w3){
        if (adDiv.display == "none"){
            if (img) img.src = "ico/mailmaxi.gif";
            adDiv.display="block";
        }else{
            if (img) img.src = "ico/mailmini.gif";
            adDiv.display ="none";
        }
    }else{
        if (adDiv.display == "none"){
            if (img) img.src = "ico/mailmaxi.gif";
            adDiv.display="visible";

        }else{
            if (img) img.src = "ico/mailmini.gif";
            adDiv.display ="none";
        }
    }
}


function confirmation(returl,pytanie) {
    var answer = confirm(pytanie)
    if (answer){
//	alert("Uwaga!");
	window.location = returl;
    }
//    else{
//	alert("Thanks for sticking around!")
//    }
}

function launchdzial(newdz){
    var remote = 'mod.php?dz=' + newdz;
    window.location = remote;
}


function showSWF(imageName, imagesFolder, imageWidth, imageHeight) {
//if(do_dw_var){
document.writeln('<OBJECT  id=top align=middle classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\""+imageWidth+"\" HEIGHT=\""+imageHeight+"\" classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000>');
document.writeln('<PARAM NAME="_cx" VALUE="20373"> ');
document.writeln('<PARAM NAME="_cy" VALUE="2117"> ');

document.writeln('<param name=\"WMode\" value=\"Opaque\">');
document.writeln('<PARAM NAME=\"Play\" VALUE=\"yes\">');

document.writeln('<param name=\"menu\" value=\"false\">');
document.writeln('<PARAM NAME=\"movie\" VALUE=\""+imagesFolder+"/" + imageName + "\"> ');
document.writeln('<PARAM NAME=\"quality\" VALUE=best> ');
document.writeln('<PARAM NAME=\"scale\" VALUE=ShowAll> ');
document.writeln('<PARAM NAME=\"bgcolor\" VALUE=#000000> ');
document.writeln('<EMBED src=\""+imagesFolder+"/" + imageName + "\" Play=\"yes\" menu=false wmode=opaque quality=best scale=ShowAll bgcolor=#000000 WIDTH=\""+imageWidth+"\" HEIGHT=\""+imageHeight+"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT>');

} 

function obiect_show(namex){
    var ns=(document.layers);
    var ie=(document.all);
    var w3=(document.getElementById && !ie);
    if(!ns && !ie && !w3) return;
    if(ie)	adDiv=eval('document.all.'+namex+'.style');
    else if(ns)	adDiv=eval('document.layers['+namex+']');
    else if(w3)	adDiv=eval('document.getElementById('+namex+').style');

    if (ie||w3){
        adDiv.visibility="visible";
    }else{
        adDiv.visibility ="show";
    }
}

function obiect_hide(namex){
    var ns=(document.layers);
    var ie=(document.all);
    var w3=(document.getElementById && !ie);
    if(!ns && !ie && !w3) return;
    if(ie)	adDiv=eval('document.all.'+namex+'.style');
    else if(ns)	adDiv=eval('document.layers['+namex+']');
    else if(w3)	adDiv=eval('document.getElementById('+namex+').style');

    if (ie||w3){
        adDiv.visibility="visible";
    }else{
        adDiv.visibility ="none";
    }
}

function getSWF(imageName, imagesFolder, imageWidth, imageHeight) {
    imgText="<OBJECT  classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\""+imageWidth+"\" HEIGHT=\""+imageHeight+"\"><param name=\"wmode\" value=\"opaque\"><param name=\"menu\" value=\"false\"><PARAM NAME=movie VALUE=\""+imagesFolder+"/" + imageName + "\"> <PARAM NAME=quality VALUE=best> <PARAM NAME=scale VALUE=exactfit> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src=\""+imagesFolder+"/" + imageName + "\" menu=false wmode=opaque quality=best scale=exactfit bgcolor=#000000 WIDTH=\""+imageWidth+"\" HEIGHT=\""+imageHeight+"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT>";
    document.write(imgText);
} 



//------------------enter wyslanie formularzajak formulaz nazywa sie form
//var hotkey=13
//if (document.layers){
//    document.captureEvents(Event.KEYPRESS)
//}
//function backhome(e){
//    if (document.layers){
//	if (e.which==hotkey){
//	    document.form.submit();	    	    
//	}
//    }else if (document.all){
//        if (event.keyCode==hotkey){
//            document.form.submit();	    	    
//        }
//    }
//}
//document.onkeypress=backhome

function show_kolory(xname) {
    var vWinCal = window.open(""+xname, "Kolory", "width=300,height=450,status=no,resizable=yes,top=200,left=200,scrollbars=1");
    vWinCal.opener = self;
}  

function show_kat(xname) {
    var vWinCal = window.open(""+xname, "Kat_lista", "width=550,height=250,status=no,resizable=yes,top=200,left=200,scrollbars=1");
    vWinCal.opener = self;
}  

function show_koloryww(xname) {
    var vWinCal = window.open("colors/"+xname, "Kolory", "width=300,height=450,status=no,resizable=yes,top=200,left=200,scrollbars=1");
    vWinCol.opener = self;    
} 

function show_kolory22(xname) {
    var vWinCal = window.open("color/"+xname, "Kolory", "width=300,height=450,status=no,resizable=yes,top=200,left=200,scrollbars=1");
    vWinCal.opener = self;
} 
 
var n=navigator.appName;
 function onColor(blah){
 blah.style.backgroundColor='#003399';
 }

 function offColor(blah){
 blah.style.backgroundColor='#5294ef';
 }

 function Enter(){
 if (event.keyCode == 13)
 document.login.submit();
 }

 function openWindow(theURL,winName,features) {
    if (winName=="edit_page"){
	win2=window.open(theURL,winName,features+", left=15,top=15");
    }else if (winName=="edit_block"){
	win2=window.open(theURL,winName,features+", left=30,top=30");
    }else{
        win2=window.open(theURL,winName,features+", left=2,top=2");
    }

    win2.creator=self;
    if(win2.focus){win2.focus();}
 }

 function openWindow0(theURL,winName,features) {
    win2=window.open(theURL,winName,features+", left=5,top=5");
    win2.creator=self;
    if(win2.focus){win2.focus();}
 }



 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;
 }

 function launchEmail(url) {
 myEmail = launch(url, "myRemote", "height=520,width=730,left=0,top=0,channelmode=0,dependent=0,directories=0,fullscreen=0,location=1,menubar=1,resizable=1,scrollbars=1,status=0,toolbar=1", "myWindow");
 }

 function openEmail(url) {
 window.open(url, "myRemote", "height=520,width=730,left=0,top=0,channelmode=0,dependent=0,directories=0,fullscreen=0,location=1,menubar=1,resizable=1,scrollbars=1,status=0,toolbar=1");
 }

 function emailBlah(form){
 form = document.login;
 var blah = location.href;
 var newWin = window.open("", "myRemote", "width=730,height=520,left=0,top=0,channelmode=0,dependent=0,directories=0,fullscreen=0,location=1,menubar=1,resizable=1,scrollbars=1,status=0,toolbar=1", "myWindow");
 newWin.document.write("<html><body><form method=\"POST\" action=\"http://mail.yep.com/websidestory1/login/loginaction.asp\" name=\"login\" target=\"_top\">");
 newWin.document.write("<input type=\"hidden\" name=\"company\" value=\"Yepmail\">");
 newWin.document.write("<input type=\"hidden\" value=\"0\" name=\"Interface\">");
 newWin.document.write("<input type=\"hidden\" value name=\"RedirURL\">");
 newWin.document.write("<input type=\"hidden\" name=\"java\" value=\"1\">");
 newWin.document.write("<input type=\"hidden\" name=\"loginname\" value=\""+form.loginname.value+"\">");
 newWin.document.write("<input type=\"hidden\" name=\"loginpassword\" value=\""+form.loginpassword.value+"\">");
 newWin.document.write("</form>");
 newWin.document.login.submit();
 location.href = blah;
 newWin.focus();
 }

 function validateFormHiJinx(form){
 if( form.email.value == ""){
 alert("Please enter your email address.");
 form.email.focus();
 return false;
 }
 var str = form.email.value
 var isEmail = ((str.indexOf("@") != -1) && (str.indexOf(".") != -1))

 if (!isEmail){
 alert("" + str + " is an invalid email address!")
 form.email.select()
 form.email.focus()
 return false;
 }
 blah(form);
 return true;
 }

 function blah(form){
 var newWin = window.open("", "thanks", "width=300,height=300");
 newWin.document.write("<html><body><form action=\"http://tools.hitbox.com/cgi-bin/news/cgi/list.cgi\" method=\"get\" name=\"traffic\">");
 newWin.document.write("<input type=\"hidden\" name=\"email\" value=\"" + form.email.value + "\">");
 newWin.document.write("<input type=\"hidden\" value=\"Subscribe\" name=\"action\">");
 newWin.document.write("<input type=\"hidden\" value=\"yep\" name=\"list\">");
 newWin.document.write("<input type=\"hidden\" name=\"r\" value=\"yep\">");
 newWin.document.write("<div style=\"position:absolute; top:-10px; left:-10px; width:1px; height:1px; visibility:hidden; overflow:hidden;\"><input type=\"checkbox\" name=\"format\" value=\"html\"");
 
 if(form.format.checked == true){
 newWin.document.write(" CHECKED><\/div>");
 }else{
 newWin.document.write("><\/div>");
 }
 newWin.document.write("</form>");
 newWin.document.traffic.submit();
 newWin.focus();
 }

function jakeplaysbingo(which) {
 if (which.options[which.selectedIndex].value != "!!") {
 var blahWin = window.open( "http://yep.com/content/newsletter/nl_" + which.options[which.selectedIndex].value + ".html", "yep", "width=575,height=460,location=no,scrollbars=yes,resizable=yes");
 blahWin.focus();
 }
}


var myRand = 1; 
var img = new Array(); // name of images w/o extension or path
var txt = new Array();
var url = new Array();

function setRand(){
 d = new Date;
 myRand = d.getSeconds();
 myRand = myRand % 6;
}

function setValues(){
 img[0] = "feat_ecards"; 
 img[1] = "feat_freestuff";
 img[2] = "feat_graphics";
 img[3] = "feat_games";
 img[4] = "jokes";
 img[5] = "feat_translation";

 txt[0] = "<b>E-cards</b></a><br>A great way to say hello to family and friends.<br>";
 txt[1] = "<b>Free Stuff</b></A><br>Who says you can't get things for free anymore?<br>";
 txt[2] = "<b>Graphics</b></A><br>Search for graphics the fast, easy way.<br>";
 txt[3] = "<b>Games</b></A><br>Busy day? Why not take a break and play?<br>";
 txt[4] = "<b>Jokes</b></A><br>Laugh for hours until your belly hurts!<br>";
 txt[5] = "<b>Translation</b></a><br>How many ways can you find to say 'hello'?<br>";

 url[0] = "http://yep.sugar3.com";
 url[1] = "http://www.yep.com/cgi-bin/displayRank_yep.cgi?free_stuff/subpage";
 url[2] = "http://yep.gograph.com";
 url[3] = "http://yep.gamehouse.com";
 url[4] = "http://yep.funnymail.com";
 url[5] = "http://yep.com/translate.shtml";
}

function getRand(){
 setRand();
 setValues();
}
function getImage(){
 document.write('');
}

function getText(){
 document.write(txt[myRand]);
}

function getUrl(){
 document.write('<a href="' + url[myRand] + '" class="catLink">');
}

function Pcertify() { 
popupWin = window.open('http://www.bbbonline.org/cks.asp?id=8112000055415', 'Participant', 'location=yes,scrollbars=yes,width=450,height=300');
window.name = 'opener'; 
}


ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false; 
var winWidth = (ns4)? window.innerWidth-8 : screen.availWidth-10;
var tmpH = screen.availHeight * 0.85;
var winHeight = tmpH; 
var srodek_x = winWidth / 2;
var srodek_y = winHeight /2;
function dispWindow (url,width,height) {
 var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',left=0,resizeble=yes,scrollbars=no,menubar=no,location=no');
}
function dispWindow2(name,url, width, height) {
 var Win2 = window.open(url,name,'width=' + width + ',height=' + height + ',resizeble=0,scrollbars=auto,menubar=no,location=no');
}
function dispWindow3(name,url, width, height) {
 var Win2 = window.open(url,name,'width=' + width + ',height=' + height + ',resizeble=0,scrollbars=no,menubar=no,location=no');
}

function okno(name,url, width, height) {
 var Win2 = window.open(url,name,'width=' + width + ',height=' + height + ',location=no,directories=no,status=yes,menubar=no,scrollbars=yes,toolbar=no,resizable=yes,scrolling=yes');
}



var win=null;
function Windowxx(mypage,myname,w,h,scroll,pos){
LeftPosition=0;
TopPosition=0;
settings='width='+(screen.width-10)+',height='+(screen.height-10)+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=no,toolbar=no,resisable=yes,scrolling=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}


var win=null;
function Window(mypage,myname,w,h,scroll,pos){
w=770;
h=520;
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
LeftPosition=0;
TopPosition=0;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=no,toolbar=no,resizable=yes,scrolling=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}

var win=null;
function WindowMap(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
LeftPosition=0;
TopPosition=0;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=no,toolbar=no,resizable=yes,scrolling=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}



var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=no,toolbar=no,resisable=no,scrolling=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}


function okno(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes,scrolling=auto';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}



function oknoopis(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=no,toolbar=no,resisable=no,scrolling=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}

function OknoScroll(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=yes,toolbar=no,resisable=no,scrolling=yes';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}



function scrollText() {
status = "GWPE (c) 2001-2006, Copyright by www.Grafnet.pl";
}



// Add options to list
function addOptions(){
  var sel = document.searchForm.whichEngine;
    for(var i = 0; i < arr.length; i++){
	sel.options[i] = new Option(arr[i][0], i); 
  }
}

// Get url for search engine
    function startSearch() {
      searchString = document.searchForm.searchText.value; 
      if(searchString != ""){
        var searchEngine = document.searchForm.whichEngine.selectedIndex;
        var finalSearchString = arr[searchEngine][1] + searchString + '&query=' + searchString ;
        location.href = finalSearchString;
      }
      return false;
    }



// Check if key pressed == enter
function checkKeyx()
{
  if(window.event.keyCode == '13'){
    return startSearch();
  }
  else return true;
}


function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}



function expandDiv(tlll) {
                what  = eval(tlll + "_menu");
                if (what.style.display == "none") {

                        what.style.display = "";

                } 

else

 what.style.display = "none";

        }



	var oldc = new Array;

	function cCell(r,m){

	 if(!document.all) return;

	 if(m){

	  for(i=0;i<r.cells.length;i++){

	  oldc[i]=r.cells[i].bgColor;

	  r.cells[i].bgColor='D3D3D3';

	  }

	 }else{

	  for(i=0;i<r.cells.length;i++){

	  r.cells[i].bgColor=oldc[i];

	  }

	 }

	}

	//

	// Jump to a page

	//

	function jump() {

		parent.location = document.links.url.options[document.links.url.selectedIndex].value;

	}

	//


function WinResize(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
LeftPosition=0;
TopPosition=0;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes,scrolling=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}

