	function topimg(l_plotis,l_aukstis,imgurl,base)
	{
		var l_aukstis2 = l_aukstis + 20;		// lango aukstis
		var l_plotis2 = l_plotis + 20;			// lango plotis
		var winl = screen.width/2-l_plotis/2;
		var wint = screen.height/2-l_aukstis/2;
		var n = Math.random();
		var newWindow = window.open(''+base+'inc/topimg.php?'+imgurl+'..','I','height='+l_aukstis2+',width='+l_plotis2+',top='+wint+',left='+winl+',  buttons=no, scrollbars=no, location=no, menubar=no, resizable=no, status=no, directories=no, toolbar=no');
	}
	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
	function topprod(l_plotis,l_aukstis,imgurl,base)
	{
		var l_aukstis2 = l_aukstis;		// lango aukstis
		var l_plotis2 = l_plotis;			// lango plotis
		var winl = screen.width/2-l_plotis/2;
		var wint = screen.height/2-l_aukstis/2;
		var n = Math.random();
		var newWindow = window.open(''+base+'inc/topprod.php?'+imgurl+'..','P','height='+l_aukstis2+',width='+l_plotis2+',top='+wint+',left='+winl+',  buttons=no, scrollbars=no, location=no, menubar=no, resizable=no, status=no, directories=no, toolbar=no');
	}
	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
	function topvideo(videourl,base)
	{
		var l_aukstis = 240 + 80;		// lango aukstis
		var l_plotis = 320 + 20;		// lango plotis
		var winl = screen.width/2-l_plotis/2;
		var wint = screen.height/2-l_aukstis/2;
		var n = Math.random();
		var newWindow = window.open(''+base+'inc/topvideo.php?'+videourl+'..','V','height='+l_aukstis+',width='+l_plotis+',top='+wint+',left='+winl+',  buttons=no, scrollbars=no, location=no, menubar=no, resizable=no, status=no, directories=no, toolbar=no');
	}
	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
	function topaudio(audiourl,base)
	{
		var l_aukstis = 30 + 10;		// lango aukstis
		var l_plotis = 210 + 10;		// lango plotis
		var winl = screen.width/2-l_plotis/2;
		var wint = screen.height/2-l_aukstis/2;
		var n = Math.random();
		var newWindow = window.open(''+base+'inc/topaudio.php?'+audiourl+'..','I','height='+l_aukstis+',width='+l_plotis+',top='+wint+',left='+winl+',  buttons=no, scrollbars=no, location=no, menubar=no, resizable=no, status=no, directories=no, toolbar=no');
	}
	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
	function topimgx(l_plotis,l_aukstis,imgurl,title,base)
	{
		var l_aukstis2 = l_aukstis + 20;		// lango aukstis
		var l_plotis2 = l_plotis + 20;			// lango plotis
		if (title!=true) { var title2 = (Math.round((Math.random()*999)+1)); }	else { var title2="mg"; }
		var winl = screen.width/2-l_plotis/2;
		var wint = screen.height/2-l_aukstis/2;
		var newWindow = window.open(''+base+'inc/topimg.php?'+imgurl+'..', 'I'+title2, 'height='+l_aukstis2+', width='+l_plotis2+', top='+wint+', left='+winl+', buttons=no, scrollbars=no, location=no, menubar=no, resizable=no, status=no, directories=no, toolbar=no');
	}
	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
	function toppage(l_plotis,l_aukstis,id,base)
	{
		var winl = screen.width/2-l_plotis/2;
		var wint = screen.height/2-l_aukstis/2;
		var n = Math.random();
		var newWindow = window.open(''+base+'inc/toppage.php?'+id+'..','P','height='+l_aukstis+',width='+l_plotis+',top='+wint+',left='+winl+', buttons=no, scrollbars=no, location=no, menubar=no, resizable=no, status=no, directories=no, toolbar=no');
	}
	

	function writeflash(path,name,w,h){
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' title='"+name+"'><param name='movie' value='"+path+"' /><param name='quality' value='high' /><embed src='"+path+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'></embed></object>");
	}
	function checkPlugin(plgIn, theURL, altURL, reqVersion) { //v4.0
	  var ok=false; 
	  //document.MM_returnValue = false;
	 
	 with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
		
		ok=(plugins && plugins[plgIn]);
		if(ok){
			
			//x = navigator.plugins["Shockwave Flash"];
			x = navigator.mimeTypes['application/x-shockwave-flash'];
			y = x.description;
			fv = y.charAt(y.indexOf('.')-1);
		if(fv<=reqVersion) { ok=false; }
		ok=false;
		}
		
		
		
	  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
		if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
		else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
		}
	  if (!ok){ flash=false;} else { flash=true; }
	  //alert(flash);	
	  return flash;
	}
	
var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
function checkPlugin2(){
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
	MSDetect = "true";
}
// -->





