    // Impede Seleção
    //document.onselectstart = function() { return false; }
    
    // Menu Lateral
   // if (document.getElementById){
   // document.write('<style type="text/css">\n')
    //document.write('.options{display: none;}\n')
   // document.write('</style>\n')
   // }
    var de="";
    function SwitchMenu(obj){
    	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("masterdiv").getElementsByTagName("span");
			//close up all the menu
		//for (var i=0; i<ar.length; i++){
		//	ar[i].style.display = "none";
		//}
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
		//		if (ar[i].className=="options1")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
    	}
    }
    
    function SwitchSubMenu(obj){
    	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("catalog").getElementsByTagName("div");
		var ard = document.getElementById(obj).getElementsByTagName("li");
		
		//----close the menu elements---------------------------------------------------
		for (var i=0; i<ar.length; i++){
			if (ar[i].className=="options1")
			ar[i].style.display = 'none';
		}
		
		//-----if the menu is closed open it, otherwise close it---------------------------
	//	alert(de);
		if(de!=obj){
			if(document.getElementById(obj).style.display != "none"){
				for (var i=0; i<ard.length; i++){
					if (ard[i].style.display != "none")
					ard[i].style.display = 'none';
				}
				el.style.display = 'none';
			}else{
				el.style.display = 'block';
			}
			de=obj;
		}else{
			de="";
		}
		
	}
    }
    
    function SwitchSubsMenu(obj){
    	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("catalog").getElementsByTagName("ul");
		var ard = document.getElementById(obj).getElementsByTagName("li");
		
		//----close the menu elements---------------------------------------------------
		for (var i=0; i<ar.length; i++){
			if (ar[i].className=="options")
			ar[i].style.display = 'none';
		}
		
		//-----if the menu is closed open it, otherwise close it---------------------------
	//	alert(de);
		if(de!=obj){
			if(document.getElementById(obj).style.display != "none"){
				for (var i=0; i<ard.length; i++){
					if (ard[i].style.display != "none")
					ard[i].style.display = 'none';
				}
				el.style.display = 'none';
			}else{
				el.style.display = 'block';
			}
			de=obj;
		}else{
			de="";
		}
		
	}
    }
	
	
	
	
    
    function SwitchSubMenu2(obj){
    	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("listitem").getElementsByTagName("div");
		var ard = document.getElementById(obj).getElementsByTagName("li");
		
		//----close the menu elements---------------------------------------------------
		for (var i=0; i<ar.length; i++){
			if (ar[i].className=="options2")
			ar[i].style.display = 'none';
		}
		
		//-----if the menu is closed open it, otherwise close it---------------------------
	//	alert(de);
		if(de!=obj){
			if(document.getElementById(obj).style.display != "none"){
				for (var i=0; i<ard.length; i++){
					if (ard[i].style.display != "none")
					ard[i].style.display = 'none';
				}
				el.style.display = 'none';
			}else{
				el.style.display = 'block';
			}
			de=obj;
		}else{
			de="";
		}
		
	}
    }
	
	
	
	function showClassName(id){
			document.getElementById(id).className='menu1 curr';
	}
	
	function showSubClassName(id){
			document.getElementById(id).className='cur';
	}
	
	function showMenuName(id){
			document.getElementById(id).className='current';
	}
	
	
	
	
	

function QFord_getImageSize(FilePath)  
    {  
        var imgSize={  
        width:0,  
        height:0  
        };  
        image=new Image();  
        image.src=FilePath;  
        imgSize.width =image.width;  
        imgSize.height=image.height;  
        return imgSize;  
    }
function get_resize_image(FilePath)  
    {  
	var a=QFord_getImageSize(FilePath);  
	var pic_size=300;
	var pwidth=a.width;
	var pheight=a.height;
	
	if(pwidth>pic_size || pheight>pic_size)
		{
			if(pwidth>pheight)percent = pic_size/pwidth;else percent = pic_size/pheight;
			new_width = pwidth * percent;
			new_height = pheight * percent;
		}
		else
		{
			new_width = pwidth;
			new_height = pheight;
		}
	
	new_padding_w = (pic_size-new_width)/2+"px";
	new_padding_h = (pic_size-new_height)/2+"px";
	new_width=new_width+"px";
	new_height=new_height+"px";
	document.getElementById('main_img').style.width=new_width;
	document.getElementById('main_img').style.height=new_height;
	document.getElementById('main_img').style.padding=new_padding_h+" "+new_padding_w+" "+new_padding_h+" "+new_padding_w; 
    }
function get_image_size(FilePath)  
    {  
		var a=QFord_getImageSize(FilePath);  
		var pwidth=a.width;
		var pheight=a.height;
	
		if(pwidth>0 && pheight>0){
			document.getElementById('pictures').style.display="block";
		}else{
			document.getElementById('pictures').style.display="none";
		}
    }
	
function block_none()  
	{
		thisURL = document.URL; 
		tmpUPage = thisURL.split( "/" ); 
		thisUPage = tmpUPage[ tmpUPage.length-1 ]; 
			if(thisUPage=='index.html' || thisUPage=='') {
	        	//document.getElementById('catalog_info').style.display='block';
			}
			else
			{
				//document.getElementById('catalog_info').innerHTML='';
			}
	}
	
function translator(lang,lang1,lang2,url){
				//window.location.href="http://translate.google.com.hk/translate?hl="+lang+"&sl="+lang1+"&tl="+lang2+"&u=http%3A%2F%2F"+url+"%2F";
	window.open( "http://translate.google.com.hk/translate?hl="+lang+"&sl="+lang1+"&tl="+lang2+"&u=http%3A%2F%2F"+url+"%2F", "about:blank")
}

function request(paras){ 
var url = location.href; 
var paraString = url.substring(url.indexOf("?")+1,url.length).split("&"); 
var paraObj = {} 
for (i=0; j=paraString[i]; i++){ 
paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=")+1,j.length); 
} 
var returnValue = paraObj[paras.toLowerCase()]; 
if(typeof(returnValue)=="undefined"){ 
return ""; 
}else{ 
return returnValue; 
} 
} 
/*
function translator(lang){ 
var turl=lang;
var langs = turl.split( "|" );
var tsl=langs[0];
var ttl=langs[1];
var referurl = document.referrer;
var tdomain=window.location.host;
window.location.href="http://translate.google.com/translate?langpair="+lang+"&u="+tdomain;
//window.location.href="http://translate.google.com.hk/translate?hl=en&sl="+tsl+"&tl="+ttl+"&u="+referurl;
} */

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
condition = !(((browserName.indexOf("Explorer") >= 0) && (browserVer < 4)) || ((browserName.indexOf("Netscape") >= 0) && (browserVer < 2)));
if (condition == true) {
	CanAnimate = true;
} else {
	CanAnimate = false;
}
function translator(pattern) {

/////////////////////////////////////////////////////////////
// Script to use language convertor
// By Saradhi
/////////////////////////////////////////////////////////////

	/// Configuration parameters //////////////
	var open_in_same_window = 0;
	//////////// End Of Configuration /////////////
	var my_location = unescape(document.location.toString());
	var new_location = "";
	var new_pattern = "";
	if (my_location.indexOf("translate_c?") != -1) {
		/// From google...
		var indexof_u = my_location.indexOf("u=");
		if (indexof_u == -1) {
			new_location = document.location;
		} else {
			var subs = my_location.substring(indexof_u, my_location.length);
			var ss = subs.split("&");
			new_location = ss[0].substring(2, ss[0].length);
		}
	} else {
		new_location = document.location;
	}
	indexof_p = pattern.indexOf("|");
	var isen = "";
	var ishome = "";
	if (indexof_p == -1) {
		indexof_p1 = pattern.indexOf("><");
		if (indexof_p1 == -1) {
			new_pattern = pattern;
			if (pattern == "en") {
				isen = 1;
				ishome = 1;
			}
		} else {
			var psplit = pattern.split("><");
			new_pattern = psplit[0] + "|" + psplit[1];
			if (psplit[1] == "en") {
				isen = 1;
			}
				ishome = 0;
		}
	} else {
		var psplit = pattern.split("|");
		new_pattern = psplit[0] + "|" + psplit[1];
		if (psplit[1] == "en") {
			isen = 1;
		}
			ishome = 0;
	}
	var thisurl = "";

	if (isen == 1) {
		if (ishome == 1) {
			var tdomain = window.location.host;
			var urlsplit = new_location.split(".com");
			if (tdomain == "translate.googleusercontent.com"){
				thisurl = urlsplit[0] + ".com/";
			} else {
				thisurl = "http://" + tdomain;
			}
		} else {
			thisurl = new_location;
		}
		open_in_same_window = 1;
	} else {
		thisurl = "http://translate.google.com/translate_c?langpair=" + new_pattern + "&u=" + new_location;
	}
	if (open_in_same_window == 1) {
		window.location.href = thisurl;
	} else {
		if (CanAnimate) {
			msgWindow = window.open("", "subwindow", "toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0");
			msgWindow.focus();
			msgWindow.location.href = thisurl;
		} else {
			msgWindow = window.open(thisurl, "subwindow", "toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0");
		}
	}
}
function translator1(pattern) {
	var thisurl = "http://translate.google.com/translate_c?langpair=" + pattern + "&u=" + document.location;
	if (CanAnimate) {
		msgWindow = window.open("", "subwindow", "toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0");
		msgWindow.focus();
		msgWindow.location.href = thisurl;
	} else {
		msgWindow = window.open(thisurl, "subwindow", "toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0");
	}
}
function showsubmenu(sid) {
	whichEl = eval("submenu" + sid);
	if (whichEl.style.display == "none") {
		eval("submenu" + sid + ".style.display=\"\";");
	} else {
		eval("submenu" + sid + ".style.display=\"none\";");
	}
}

function setCookie(name, value) 
{ 
    var argv = setCookie.arguments; 
    var argc = setCookie.arguments.length; 
    var expires = (argc > 2) ? argv[2] : null; 
    if(expires!=null) 
    { 
        var LargeExpDate = new Date (); 
        LargeExpDate.setTime(LargeExpDate.getTime() + (expires*1000*3600*24));         
    } 
    document.cookie = name + "=" + escape (value)+((expires == null) ? "" : ("; expires=" +LargeExpDate.toGMTString())); 
}
function getCookie(Name) 
{ 
    var search = Name + "=" 
    if(document.cookie.length > 0) 
    { 
        offset = document.cookie.indexOf(search) 
        if(offset != -1) 
        { 
            offset += search.length 
            end = document.cookie.indexOf(";", offset) 
            if(end == -1) end = document.cookie.length 
            return unescape(document.cookie.substring(offset, end)) 
        } 
        else return "" 
    } 
} 
function deleteCookie(name) 
{ 
	 var expdate = new Date(); 
	 expdate.setTime(expdate.getTime() - (86400 * 1000 * 1)); 
    setCookie(name, "", expdate); 
} 
