 var window_height = parseInt(getHeight());
// document.getElementById("content_div").style.height = parseInt((getHeight()-150))+"px"; 


   var content_div = document.getElementById("content_div");
   if (content_div != null)  
     document.getElementById("content_div").style.height ="447px"; 
    else
      document.getElementById("content_div_shop").style.height ="471px";   
  
  
  
  var big_table = document.getElementById('big_content');  
  var top_padding = parseInt((window_height - 590) / 2);
  big_table.style.marginTop = top_padding +'px';  
  

  
 
 var total_width  = parseInt(getWidth());

 var tbl = getElementsByClass('top_bar'); 
 var top_bar = tbl[0]; 
 
 var top_width = parseInt($("#tbl_top").width());
 
 



 if ($.browser.msie)
 {	
    //if ( getCookie('ln') == '6' || !getCookie('ln'))  top_width = top_width + 150;
    //else top_width = top_width + 130;
    if(my_lang==6)
    	top_width = top_width + 150;
    else
	    top_width = top_width + 130;
 }

 var left = total_width - ( (total_width-1002)/2 + 200 + top_width);   
 if(top_bar)
 {
	 top_bar.style.width = top_width+'px'; 
	 top_bar.style.left = left+'px'; 
	 top_bar.style.top = parseInt(30+top_padding)+13+'px';
 }
    
 var tbl = getElementsByClass('top1_bar'); 
 var top_bar = tbl[0]; 
 var left = total_width - ( (total_width-1002)/2 + 200 + 800);  
 if(top_bar)
 {
 top_bar.style.width = '800px'; 
 top_bar.style.left = left+'px';  
 top_bar.style.top = parseInt(80+top_padding)+'px';
 }
 
  

     
 
 var div_fade = document.getElementById('fadingperpage');
 if(div_fade){
 div_fade.style.position = 'absolute'; 
 div_fade.style.top  = top_padding+'px';
 div_fade.style.left = parseInt((total_width-1002)/2)+'px';
 }
 
 
  var left_menu = document.getElementById('left_menu');  
  
  if (left_menu!=undefined)
   {
		  /*left_menu.style.width = '240px'; */
		  left_menu.style.position = 'absolute';   
		  left_menu.style.left = parseInt((total_width-1002)/2)+15+'px';  
		  left_menu.style.top = parseInt(150+top_padding)-22+'px';
		  left_menu.style.zIndex  = '1000';
   }
 
 

	    var lang_div = document.getElementById("lang_div");
	    if(lang_div){
	     lang_div.style.position = "absolute";
	     lang_div.style.left =  parseInt((total_width-490)/2)+'px';
	     /* lang_div.style.top =  parseInt(30+top_padding)+13+'px'; */
		 lang_div.style.top =  parseInt(top_padding)+1+'px'; 
	     lang_div.style.zIndex =  '2';
	    }
 
 
 function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}
 
 function getHeight() 
{
   var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'

    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible

    myHeight = document.body.clientHeight;
  }

  return  myHeight ;
}

 function getWidth() 
{
   var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) 
  {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'

    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible

    myWidth = document.body.clientWidth;
  }

  return  myWidth ;
}



if (mtDropDown.isSupported()) 
	{
					mtDropDown.renderAll();
	}
	
	
  var IE4=0;
  var W3C=0;
  var NS4;
  var activeFolder;

  IE4 = (document.all) ? 1 : 0;
  NS4 = (document.layers) ? 1 : 0;
  W3C = (document.getElementById) ? 1 : 0;
  activeFolder = 0;

  if(IE4){
    block="";
    none="none";
  }else if(W3C){
    block="block";
    none="none";
  }
 function clap(id){
//    if(IE4){
 //     myObj=document.all['d2'];
 //   }else if(W3C){
 //     myObj=document.getElementById('d2');
 //   }

    if(id == 0){
      return false;
    }
	document.cookie = "dmenu="+id;
	
   if(IE4){
      myObj=eval("document.all['d"+id+"']");
    }else if(W3C){
      myObj=eval("document.getElementById('d"+id+"')");
    }

	    if(IsValidObject(myObj)) {
		if(!NS4){
    	  if(myObj.style.display == none){
       			 myObj.style.display = block;
	      }
		  else{
		     //   myObj.style.display = none;
	      }
		}  
	}	
  }

var demuvisited = getCookie("dmenu");

if(IE4 && demuvisited){
      myObj=eval("document.all['d"+demuvisited+"']");
	  if(IsValidObject(myObj))
	 	 myObj.style.display = block;
    }else if(W3C && demuvisited){
      myObj=eval("document.getElementById('d"+demuvisited+"')");
	  if(IsValidObject(myObj))
	 		 myObj.style.display = block;
    }


function IsValidObject(objToTest) {
		if (null == objToTest) {
			return false;
		}
		if ("undefined" == typeof(objToTest) ) {
			return false;
		}
		return true;

	}
	
	
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

	
	