 //IMAGE PRELOADING
 PL=new Image;
 PLon=new Image;
 EN=new Image;
 ENon=new Image;
 DE=new Image;
 DEon=new Image;
 ES=new Image;
 ESon=new Image;
 RU=new Image;
 RUon=new Image;
 
 PL.src="images/pl.png";
 PLon.src="images/pl_on.png";
 EN.src="images/en.png";
 ENon.src="images/en_on.png";
 DE.src="images/de.png";
 DEon.src="images/de_on.png";
 ES.src="images/es.png";
 ESon.src="images/es_on.png";
 RU.src="images/ru.png";
 RUon.src="images/ru_on.png";

function browserCheck() 
{
	this.name = navigator.userAgent.toLowerCase();
	this.version = navigator.appVersion.toLowerCase();
	this.ver = parseInt(this.version);
	this.verlong = parseFloat(this.version);
	this.ie = (this.name.indexOf('msie') != -1);
	this.ie3 = (this.version.indexOf('msie 3') != -1);
	this.ie4 = (this.version.indexOf('msie 4') != -1);
	this.ie5 = (this.version.indexOf('msie 5') != -1);
	this.ie4up = (this.ie && (this.ver >= 4));
	this.ns  = ((this.name.indexOf('mozilla') != -1) && ((this.name.indexOf('spoofer') == -1) && (this.name.indexOf('compatible') == -1)));
	this.ns2 = (this.ns && (this.ver == 2));
	this.ns3 = (this.ns && (this.ver == 3));
	this.ns4 = (this.ns && (this.ver == 4));
	this.ns5 = (this.ns && (this.ver == 5));
	this.ns3up = (this.ns && (this.ver >= 3));
	this.ns4up = (this.ns && (this.ver >= 4));
	this.ns5up = (this.ns && (this.ver >= 5));
	this.opera = (this.name.indexOf('opera') != -1);
	if (this.ns2 || this.ie3) this.jsv = 1.0
	else if (this.ns3 || this.opera) this.jsv = 1.1
	else if (this.ns4 || this.ie4) this.jsv = 1.2
	else if ((this.ns && (this.verlong > 4.05)) || (this.ie && (this.ver > 4))) this.jsv = 1.2;
	this.js = (this.ie4up || this.ns3up);
}

is = new browserCheck();

function foto(dir,fname,ext,width,height,descr,scrolling) 
{
	if (is.ie) win_width = width + 20; else win_width = width + 16;
	if (is.ie) win_height = height + 25; else win_height = height + 15;

        if(scrolling==1)
        {
	   window.open(dir+'/'+fname+'.'+ext,descr,'top=0,left=0,width='+win_width+',height='+win_height+',menubar=no,toolbar=no,location=no,scrollbars=yes,status=no,resizable=no');
        }
        else
        {
           window.open(dir+'/'+fname+'.'+ext,descr,'top=0,left=0,width='+win_width+',height='+win_height+',menubar=no,toolbar=no,location=no,scrollbars=no,status=no,resizable=no');
        }
}

function bigPhoto(fname,ext,width,height,desc) 
{
  fileN = "maxview.php?img="+fname+"&ext="+ext+"&w="+width+"&h="+height+"&desc="+desc;
  window.open(fileN,'','top=0,left=0,width='+width+',height='+height+',menubar=no,toolbar=no,location=no,scrollbars=no,status=no,resizable=no');
}

function system_action(cmd)
{
    document.navigation.action.value = cmd;
    document.navigation.submit();
    return;
}
