

function NewWin1(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',noresizable';
var generator=window.open('', 'pavadinimas', winprops);
generator.document.write('<html><head><title>'+myname+'</title><META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0><table ><tr><td valign=center align=center width="'+w+'" height="'+h+'"><IMG  src="'+mypage+'"  ></td></tr></table></body></html>');
generator.focus();
generator.document.close()
}

function NewWin10(link,mypage, myname, w, h, scroll) {

var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',noresizable';
var generator=window.open('', 'pavadinimas', winprops);
if (link){
generator.document.write('<html><head><title>File download</title><META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0 bgcolor=#fbeaa3><center><br><br><h2>  >>>>> RIGHT  CLICK >>>></h2><a href="'+link+'" ><h2>'+link+'</h2></a><br><br>(Right click on the link to save the file to your hard drive: <br>Save target as...) </center></body></html>');
} else {
generator.document.write('<html><head><title>'+myname+'</title><META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0><table ><tr><td valign=center align=center width="'+w+'" height="'+h+'"><IMG  src="'+mypage+'"  ></td></tr></table></body></html>');
}

generator.focus();
generator.document.close()
}

function NewW(link,mypage, myname,id , w, h, scroll) {
//alert (mypage);

if (mypage){

var emailExp = /^http:\/\/(.*)$/;


	if(mypage.match(emailExp)){

	FileNameFull = mypage.split(".");
	numb= FileNameFull.length;
	FileExt = FileNameFull[(numb-1)];
	//alert('OK '+numb+' '+FileExt+' '+mypage);

	} else {

	FileNameFull = mypage.split(".");
	numb= FileNameFull.length;
	FileExt = FileNameFull[(numb-1)];

var linkExp = /^(.*)\/(.*)$/;

		if(!mypage.match(linkExp)){
			mypage=link + mypage;
		}

//mypage=link + mypage;
//alert(' FileExt='+FileExt+' mypage='+mypage);
}
FileExt=FileExt.toLowerCase()
myname='* WWW.BAKENA.COM * '+myname;
//STOP//var vid='<link type="text/css" rel="stylesheet" href="flash/flash_c.php?c='+id+'" />';
var vid=' ';
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',noresizable';
var generator=window.open('', 'pavadinimas', winprops);


if (FileExt=='gif' | FileExt=='png'|FileExt=='jpg'|FileExt=='jpeg'){
generator.document.write('<html><head><title>'+myname+'</title>'+vid+'<META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0><table ><tr><td valign=center align=center width="'+w+'" height="'+h+'"><IMG  src="'+mypage+'"  ></td></tr></table></body></html>');
}else if (FileExt=='swf'){
generator.document.write('<html><head><title>'+myname+'</title>'+vid+'<META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+w+'" height="'+h+'"><param name=movie value="'+mypage+'"><param name="quality" value="high"><param name="menu" value="false"><embed src="'+mypage+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object></body></html>');
} else if (FileExt=='wmv' | FileExt=='mpg'|FileExt=='mpeg'|FileExt=='avi'){
generator.document.write('<html><head><title>'+myname+'</title>'+vid+'<META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0><OBJECT ID=WMPlay width="'+w+'" height="'+h+'" classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6  codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 standby=Loading Microsoft Windows Media Player components...  type=application/x-oleobject>   <PARAM name=URL value="'+mypage+'">  <PARAM name=AllowChangeDisplaySize value=True>  <PARAM NAME=ShowControls VALUE=1>  <PARAM NAME=ShowDisplay VALUE=1>  <PARAM NAME=ShowStatusBar VALUE=1>  <PARAM NAME=AutoStart VALUE=TRUE>  <PARAM NAME=InvokeURLS Value=False>  <embed name=WMplay width=480 height=400 type=application/x-mplayer2 pluginspage=http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/   src="'+mypage+'" AutoStart=True></embed></object></body></html>');
}else if (FileExt=='php' | FileExt=='htm'|FileExt=='html'){
//generator.document.write('<html><head><title>'+myname+'</title>'+vid+'<META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0><h1>'+myname+'</h2><iframe src="'+mypage+'" frameborder=0 vspace=0 hspace=0 marginwidth=0 marginheight=0 scrolling=no width='+w+' height='+h+'></iframe></body></html>');
generator.document.write('<html><head><title>'+myname+'</title>'+vid+'<META HTTP-EQUIV="Refresh"  CONTENT="1; URL='+mypage+'"><META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0 bgcolor=yellow><center><br><br><h2>  >>>>> >>>> CLICK >>>></h2><a href="'+mypage+'" ><h1>'+myname+'</h2></a></center></body></html>');
} else {
generator.document.write('<html><head><title>'+myname+'</title>'+vid+'<META HTTP-EQUIV="Refresh"  CONTENT="1; URL='+mypage+'"><META http-equiv=Content-Type content="text/html; charset=windows-1257"></head><body leftMargin=0 topMargin=0 bgcolor=yellow><center><br><br><h2>  >>>>> >>>> CLICK >>>></h2><a href="'+mypage+'" ><h1>'+myname+'</h2></a></center></body></html>');
}
   //generator.blur();
   generator.focus();

generator.document.close()
} //if
} // function















function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		Button1_over = newImage("images/Button1-over.gif");
		Button2_over = newImage("images/Button2-over.gif");
		Button3_over = newImage("images/Button3-over.gif");
		Button4_over = newImage("images/Button4-over.gif");
		Button5_over = newImage("images/Button5-over.gif");
		preloadFlag = true;
	}
}

