function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function showHideLayers() { //v6.0
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function hideVisible(objName) {
   var obj = findObj(objName);
    	var vis = obj.style.display;
          eval("obj.style.display='none'");
      }

function switchVisible(objName) {
   var obj = findObj(objName);
    	var vis = obj.style.display;
    if (vis == "block")
      eval("obj.style.display='none'");
    else eval("obj.style.display='block'");
  }

function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}
function openHtmWindow_Fever(imageName,Height,imageWidth,imageHeight,alt,comment,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+Height+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><head><title>'+alt+'</title><link href="../img/header.css" rel="stylesheet" type="text/css"></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');
	newWindow.document.write('<p class="gal">'+comment);
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
	if (imageType == "swf"){
	newWindow.document.write('<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=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
function showHideMaps() {
  var i,p,v,obj,args=showHideMaps.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}
function openBrWindow(theURL) {
 features= 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=560,height=550';
  window.open(theURL,'NewPage',features);
}
function openVideoWindow(theURL,winWidth,winHeight) {
 features= 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width='+winWidth+',height='+winHeight;
  window.open(theURL,'NewPage',features);
}

function createVideoApplet(filename,idname) {
document.getElementById(idname).innerHTML='<applet myscript code=\"videovista.class\" archive=\"video/videovista.jar\" name=\"VideoVista\" width=\"322\" height=\"258\"><param name=\"VideoPath\" value=\"'+filename+'\"><param name=\"AutoPlay\" value=\"true\"><param name=\"MegaVision\" value=\"true\"><param name=\"BurstSeek\" value=\"true\"><a href=\"http://www.java.com/download\" alt=\"Java Download\" target=\"_blank\" class=\"java\"><br>Для просмотра видео на этой странице требуется Java;<br>перейдите по этой ссылке для установки<br>The video available on this page requires Java;<br>follow this link to install it<br></a></applet>'
}




