﻿function overmenu(obj) {
	if (obj.className.indexOf('a') >= 0) {
		obj.className = obj.className.replace('a','');
	}
	else {
		obj.className = obj.className+'a';
	}
}

function showMain(obj, s) {
	//$$('#main div.rightmain').invoke('hide');
	/*$$('#sidemenu li').each(function(o){
		o.style.backgroundImage = 'url(/en/images/index_17.gif)';
		o.style.color = '#4482bb';
	});*/
	var divarr = document.getElementsByTagName('div');
	var path = $('pathname');
	for (var i=0;i<divarr.length;i++)
	{
		if( divarr[i].className=='rightmain')
		{
			divarr[i].style.display = 'none';
		}
	}
	var liarr = document.getElementsByTagName('li');
	for (var i=0;i<liarr.length;i++)
	{
		if( liarr[i].id.indexOf('leftmenu') >= 0 )
		{
			liarr[i].style.backgroundImage = 'url(/en/images/index_23.gif)';
			liarr[i].style.color = '#ffffff';
		}
	}	
	if ($('rightmain'+s) != null)
	{
		$('rightmain'+s).style.display = '';
	}
	obj.style.backgroundImage = 'url(/en/images/index_21.gif)';
	obj.style.color = '#e36500';
	path.innerHTML = obj.innerHTML.replace('·', '').replace('&nbsp;&nbsp;&nbsp;&nbsp;', ' ');
	//o.className = 'selectMenu';
}

function showMainLink(s) {
	location.href = s;
}

var resizemode = 2
function imgresize(o){
	if (resizemode==2 || o.onmousewheel){
		if(o.width > 550 ){
			o.style.width='550px';
		}
		if(o.height > 413){
			o.style.height='413px';
		}
	}
	else{
		var parentNode=o.parentNode.parentNode
		if (parentNode){
			if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='98%';
		}
		else{
			var parentNode=o.parentNode
			if (parentNode){
				if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='98%';
			}
		}
	}
}

function insertFlash(elm, url, w, h) {
if (!document.getElementById(elm)) return;
var str = '';
str += '<object width="'+ w +'" height="'+ h +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" id="f1">';
str += '<param name="movie" value="'+ url +'">';
str += '<param name="wmode" value="transparent">';
str += '<param name="quality" value="autohigh">';
str += '<embed width="'+ w +'" height="'+ h +'" src="'+ url +'" quality="autohigh" wmode="opaque" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
str += '</object>';
document.getElementById(elm).innerHTML = str;
}

