var last_expanded = '';
function showHide(id)
{
	var obj = document.getElementById(id);
	var status = obj.className;
	if (status == 'hide') 
	{
		if (last_expanded != '') 
		{
			var last_obj = document.getElementById(last_expanded);
			last_obj.className = 'hide';
		}
		obj.className = 'show';
		last_expanded = id;
	} 
	else 
	{
		obj.className = 'hide';
	}
}

function resize(which, max) 
 {
        var elem = document.getElementById(which);
        if (elem == undefined || elem == null) return false;
        if (max == undefined) max = 800;
        if (elem.width > elem.height) 
			{
			  if (elem.width > max)	elem.width = max;
        	}
		else {
          if (elem.height > max) elem.height = max;
        }
 }
 
 
function quotewin(url){
	popwin= window.open (url, 'popwin', 'location=0,status=0,scrollbars=0,width=420,height=430')
	popwin.moveTo(200,200)
}


function changeLang(){
	var new_lang = document.newLang.lang.value;
	
	if (new_lang == "english"){
		window.location = "http://www.mptgroup.com/index.php";
	}else{
		window.location = "http://www.mptgroup.com/index_"+new_lang+".php";
	}	
}