<!--
document.pics=new Array();
document.pics[1]=new Image;
document.pics[1].src='img/gui/card2.gif';
document.pics[2]=new Image;
document.pics[2].src='img/gui/card22.gif';
//
function x(){
	return void[0];
}
//
function maginfo(layerName){
	if(document.getElementById("maginfo"+layerName).style.display=='none'){
		if (currOpenDiv>0) {
	    	document.getElementById("maginfo"+currOpenDiv).style.display='none';}
			currOpenDiv = layerName;
			document.getElementById("maginfo"+layerName).style.display='block';
		}else{
			currOpenDiv = 0;	    
			document.getElementById("maginfo"+layerName).style.display='none';
	}
return void[0];
}
//
function showMap(){
	if(document.getElementById("map").style.display=='none'){
		document.getElementById("mapbox").style.display='block';
		document.getElementById("map").style.display='block';
	}else{    
		document.getElementById("map").style.display='none';
		document.getElementById("mapbox").style.display='none';
	}
return void[0];
}
//
function info(layerName){
	if(document.getElementById(layerName).style.display=='none'){
		document.getElementById(layerName).style.display='block';
	}else{    
		document.getElementById(layerName).style.display='none';
	}
return void[0];
}
//
function addhide(layerName){
	div = document.getElementById(layerName);
	if(div) {
		if(div.style.display=='block'){
			div.style.display='none';
		}
	}
return void[0];
}
//
function headShowHide(action) {
	switch (action) {	
		case 0:
			document.getElementById("header1").style.display='none';
			document.getElementById("header2").style.display='none';
			document.images["top_menu_pic"].src='img/gui/card22.gif';
		break;
		case 1:
			document.getElementById("header1").style.display='block';
			document.getElementById("header2").style.display='block';
			document.images["top_menu_pic"].src='img/gui/card2.gif';
		break;
	}
return void[0];
}
//
function div_expand(layerName){
	document.getElementById(layerName).style.display='block';
	return void[0];
}
function div_hide(layerName){
	document.getElementById(layerName).style.display='none';
	return void[0];
}
//
function box(layerName){
	if(document.getElementById("box"+layerName).style.display=='none'){
		document.getElementById("box"+layerName).style.display='block';
	}else{
		document.getElementById("box"+layerName).style.display='none';
	}
return void[0];
}
//
function adjustIFrameSize(id){
    myIframe = document.getElementById("frame"+id);
    if (myIframe) {
        if(myIframe.contentDocument && myIframe.contentDocument.body.offsetHeight){
            // W3C DOM (and Mozilla) syntax
            myIframe.height = myIframe.contentDocument.body.offsetHeight;    
        }else if(myIframe.Document && myIframe.Document.body.scrollHeight){
            // IE DOM syntax
            myIframe.height = myIframe.Document.body.scrollHeight;
        }
    }
}

function imgopen(imgf,tit){

rand_id='image'+(Math.round(Math.random()*1000));

outf="<html>"
 +"<head>"
 +"<title>"+tit+"</title>"
 +"<style>body{margin:0px}</style>"
 +"</head>"
 +"<body leftmargin=0 topmargin=0>"
 +"<img src=\""+imgf+"\">";

iopen="iwin=self.open('"+imgf+"', '"+rand_id+"', 'width='+(img1.width)+',height='+(img1.height)+',top=0,left=0');"
 +"iwin.document.write('"+outf+"');"
 +"iwin.focus();";

img1=new Image();
img1.src=imgf;

if(img1.width!=0) eval(iopen);

else{
iwin = self.open('about:blank', 'f'+rand_id, 'width=100,height=100,top=0,left=0');
iwin.document.write("<html>"
+"<body>Загрузка...<br>"
 +"<"+"script>"
  +"function imo(img1){"+iopen
  +"self.close();"
 +"}<"+"/script>"
 +"<img src='"+imgf+"' onload='imo(this);'>");
 }
}

function openSWF(srcFile) {

//	window.showModalDialog("include/img.php","_blank","width=320,height=240,resizable=0,scrollbars=1");
	window.open("include/img.php","_blank","width=320,height=240,resizable=0,scrollbars=1");

	//winW=320;
	//winH=240;
	//alert('w'+document.body.scrollLeft);
	//alert('h'+document.body.scrollTop);
	//alert('ww'+winW);
	//alert('hh'+winH);
	//win='win';
	//x = document.body.scrollWidth/2 - 20;
	//y = document.body.scrollHeight/2 + 25;
	//parStr="width=" + winW + ",height=" + winH + ",top=" + y + ",left=" + x + ",resizable=no,scrollbars=no";
   	//window.open(srcFile,win,parStr);
}
function rating(str){
	location='rating.php?rt='+str;
return void[0];
}

//-->