<!--
var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;
var gFormVal = "";
var gLayerLockFlag = false;
var gMainNavId = 0;
//var gSubLaySecOldId = 0;
//var gSubArrowFlag = true;


/* DEFINES Brovwser types */
//function DHTML_init() {

 if (window.opera) {
     OP = 1;
 }
 if(document.getElementById) {
   DHTML = 1;
   DOM = 1;
 }
 if(document.all && !OP) {
   DHTML = 1;
   MS = 1;
 }
if(document.layers && !OP) {
   DHTML = 1;
   NS = 1;
 }
//}


/*function setFormValue(val) {
//alert(gFormVal)
	gFormVal = val;
} */



function sendSearch(){

    gFormVal = document.thisform.searchexp.value
    if (gFormVal == "" || gFormVal.length <= 2)
    {
		alert(gMsgNoExp)
    } else {
		location.href= gPath + "main.php?db_id=" + gDbIdSearch + "&lang_id=" + gLang_id + "&searchexp=" + gFormVal
	}
}


function findPosX(obj){
	var curleft = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (document.layers) {
		curleft += obj.x;
    }
	    return curleft;
}


function findPosY(obj){
	var curtop = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (document.layers) {
		curtop += obj.y;

    }
	return curtop;
}


function AcButt(id) {
    gOpenSubId = new Array();
    id = getLayerId(id);
    obj = eval(document.getElementById("mntd"+id));
    obj.style.backgroundColor = gArrMainNavbgCol[id];
    sLayPos(id);
}


function IacButt(id) {

    id = getLayerId(id);
    obj = eval(document.getElementById("mntd"+id));
    obj.style.backgroundColor  = gMainNavColIac;
    hLayPos(id);
}


function IacButtSubNav(id) {

    id = getLayerId(id);
    obj = eval(document.getElementById("mntd"+id));
	obj_a = eval(document.getElementById("mnArrowtd"+id));
    obj.style.backgroundColor  = gMainNavColIac;
	obj_a.style.backgroundColor  = gMainNavColIac;
    //hLayPos(id);
}

function AcButtSubNav(id) {
    
    id = getLayerId(id);
    obj = eval(document.getElementById("mntd"+id));
    obj_a = eval(document.getElementById("mnArrowtd"+id))
    obj.style.backgroundColor = gArrMainNavbgCol[gMainNavId];
    obj_a.style.backgroundColor = gArrMainNavbgCol[gMainNavId];
	//unLockMainNav();
	//hSecLayPos();
}

function IacSearch(id){

    obj = eval(document.getElementById(id));
    obj.style.backgroundColor  = "#ffffff";
}


function AcSearch(id){

    obj = eval(document.getElementById(id));
    obj.style.backgroundColor  = "#EEEEEE";
}


// Returns layer id whithout prefixes;
function getLayerId(id) {

     id = id.replace( "mntd","");
     id = id.replace( "mna","");
     id = id.replace( "subnav","");
	 id = id.replace( "mnArrowtd","");

     return id;
}

function AcImg(name) {

    document.images[name].src = gPathImgG + "butt_" + name + "_ac.jpg";
}

function IacImg(name) {

    document.images[name].src = gPathImgG + "butt_" + name + "_iac.jpg";
}

/* Hides and shows layer IE 4.x style */
function _ie4xLayer_change(id, status) {

    document.all[id].style.visibility = status;
}



/* Hides and shows layer DOM style */
function _domLayer_change(id, status) {
    
    document.getElementById(id).style.visibility = status;
}


function _NS4xLayer_change (id, status) {

   status == gLv ? status = "show" : status = "hide";
   document.layers[""+id].visibility = status;
}



function _layerVisiChange(id, status) {

        if (DOM && DHTML) {
            
            _domLayer_change(id, status);
        }

        else if (MS && DHTML) {
        
            _ie4xLayer_change(id, status)
        }

	    else if (NS && DHTML) {

			_NS4xLayer_change (id, status)
	    }
}


function hideLayer(id) {
	
	_layerVisiChange(id, gLh);
}


function showLayer(id) {
     
	_layerVisiChange(id, gLv);
}





function hLayPos(id) {

      if (!gLayerLockFlag)
      {   
        gSubLayOldId = 0;
        hideLayer("subnav" + id);
      }
}



function openPrint() {
   
   var url = gPath + "print.php?db_id=" + gDb_id + "&lang_id=" + gLang_id + "&pro_group_id=" + gProGroupId + "&pro_id="+ gProId + "" 
   w = window.open(url,"Print","width=720,height=540,toolbar=no,scrollbars=yes,menubar=yes")
}


function openRecommend() {

    xpos = ( screen.width / 2 ) - 150  
	ypos = ( screen.height / 2 ) - 125
    
	    w = window.open(gPath + "recommend.php?db_id=" + gDb_id + "&lang_id=" + gLang_id ,"recommend","width=360,height=400,left=" + xpos + ",top=" + ypos);

	w.focus();
}



function openLargeImg(img,width,height) {

    xpos = ( screen.width / 2 ) - 150  
	ypos = ( screen.height / 2 ) - 125
    
	    w = window.open("img_large.php?img_name="+img+"&img_width="+width+"&img_height="+height,"recommend","width="+width+",height="+height+",left=" + xpos + ",top=" + ypos);

	w.focus();
}


function unLockMainNav() {

 gUnlockMainNav = true;

}


var gSubLevel = 1;

function showFirstSubNav(){

		showLayer("subnav" + gMainNavId);
}


function sLayPos(id){

	//document.getElementById("bench").innerHTML = "sLayPos&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+id+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
	 if (gUnlockMainNav)
	 {
		 omain = eval(document.getElementById("mna" + id));
		 o  = eval(document.getElementById("subnav" + id));
		 o.style.left = findPosX(omain) - 5;
		 o.style.top = 290;

		 showLayer("subnav" + id);
		 gSubLayOldId = id;
	 }
}


function showSecSubNav(id,level,arg) {
     
	 if (gUnlockMainNav)
	 {
	 	 //document.getElementById("bench").innerHTML = arg+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+level+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+id+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
		 
		 osub = eval(document.getElementById("mnArrowtd" + id));
		 o  = eval(document.getElementById("subnav" + id));
		 o.style.left = findPosX(osub) +12;
		 o.style.top = findPosY(osub)-5;
         
		 gOpenSubId[level]=id;

		switch (arg){
		//ARROW ACTION
        case 1:
		 if(level == 1) { 
         //
			showLayer("subnav" + gOpenSubId[1]);
		 }

		 if(level == 2) { 
         //
			showLayer("subnav" + gOpenSubId[2]);
		 }

		 if(level == 3) { 

            showLayer("subnav" + gOpenSubId[2]);
			showLayer("subnav" + gOpenSubId[3]);
		 }
		 break;
		 case 2:
		 if(level == 0) { 
         //
			showLayer("subnav" + gMainNavId);
		 }
		 if(level == 1) { 
         //
			showLayer("subnav" + gOpenSubId[2]);
		 }
		 if(level == 2) { 
         //
			showLayer("subnav" + gOpenSubId[2]);
		 }

		 if(level == 3) { 
         //
		    showLayer("subnav" + gOpenSubId[2]);
			showLayer("subnav" + gOpenSubId[3]);
		 }
		 break;
        }

		 //HIDES HIGHEST LEVEL IF POINTER MOVES TO LOWER

		 showLayer("subnav" + gMainNavId);
		 gLayerLockFlag = true;
		 //gSubLaySecOldId = id;
	 }
}


function hideSecSubNav(id,level,arg) {
	    //document.getElementById("bench").innerHTML = arg+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+level+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+id+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"

		switch (arg){
		//ARROW ACTION
        case 1:
		   if(level == 1){
				hideLayer("subnav" + gOpenSubId[1]);
		   }
		   if(level == 2){
				hideLayer("subnav" + gOpenSubId[2]);
				
				if(gOpenSubId[3]){ 
					hideLayer("subnav" + gOpenSubId[3]);
				}
		   }
		   if(level == 3){
		        hideLayer("subnav" + gOpenSubId[2]);
				hideLayer("subnav" + gOpenSubId[3]);
		   }
		 break;

		 case 2:

		 if(level == 1){
				hideLayer("subnav" + gOpenSubId[1]);
		 }
		 if(level == 2){
				hideLayer("subnav" + gOpenSubId[2]);
				
				if(gOpenSubId[3]){ 
					hideLayer("subnav" + gOpenSubId[3]);
				}
		 }
		 if(level == 3){
		        hideLayer("subnav" + gOpenSubId[2]);
				hideLayer("subnav" + gOpenSubId[3]);
		 }
		 break;
		 }

		gLayerLockFlag = false;
		hideLayer("subnav" + gMainNavId );
}


function hLayPos(id) {

      if (!gLayerLockFlag)
      {   
        gSubLayOldId = 0;
        hideLayer("subnav" + id);
      }
}



function setMainNavId(id){

		gMainNavId = id;
}

function go(level){

}

function layerUnlock(){

	gLayerLockFlag = false;
}




//-->
