    function iframeAutoFit()
    {
        try
        {
            if(window!=parent)
            {
                var a = parent.document.getElementsByTagName("IFRAME"); //TagName IFRAME
                for(var i=0; i<a.length; i++) //author:meizz
                {
                    if(a[i].contentWindow==window)
                    {
                        var h1=0, h2=0;
                        a[i].parentNode.style.height = a[i].offsetHeight +"px";
                        a[i].style.height = "10px";
                        if(document.documentElement&&document.documentElement.scrollHeight)
                        {
                            h1=document.documentElement.scrollHeight;
                        }
                        if(document.body) h2=document.body.scrollHeight;

                        var h=Math.max(h1, h2);
			h=Math.max(h,600);
                        if(document.all) {h += 4;}
                        if(window.opera) {h += 1;}
                        a[i].style.height = a[i].parentNode.style.height = h +"px";
                    }
                }
            }
        }
        catch (ex){}
    }
    if(window.attachEvent)
    {
        window.attachEvent("onload",  iframeAutoFit);
        //window.attachEvent("onresize",  iframeAutoFit);
    }
    else if(window.addEventListener)
    {
        window.addEventListener('load',  iframeAutoFit,  false);
        //window.addEventListener('resize',  iframeAutoFit,  false);
    }
		 function checkForm()
		 {
		 	if(document.enquiry.message.value.length<3)
			{
				alert("Please input Inquiry Message");
				document.enquiry.message.focus();
				return false;
			}
			var chobj=document.getElementsByName("request");
			var hasc=false;
			for(var i=0;i<chobj.length;i++)
			{
					if(chobj[i].checked==true)
					{
						hasc=true;
						
						if(chobj[i].value=="99")
							{
							
									if(document.enquiry.request_other.value.length<=2)
											{
												alert("Please input the other info because you have checked it.");
												document.enquiry.request_other.focus();
												return false;
											}
							}
					
					}

			}
						
			if(hasc==false)
			{
				alert("Please check one at least");
				return false;
			}
			if(document.enquiry.companyName.value.length<3)
			{
				alert("Please input the name of company.");
				document.enquiry.companyName.focus();
				return false;
			}
			if(document.enquiry.address.value.length<3)
			{
				alert("Please input the address of company.");
				document.enquiry.address.focus();
				return false;
			}
			if(document.enquiry.contact.value.length<3)
			{
				alert("Please input the contact person.");
				document.enquiry.contact.focus();
				return false;
			}
			if(document.enquiry.job_title.value.length<3)
			{
				alert("Please input the job title.");
				document.enquiry.job_title.focus();
				return false;
			}
			if(document.enquiry.phone.value.length<3)
			{
				alert("Please input the phone number.");
				document.enquiry.phone.focus();
				return false;
			}
			if(document.enquiry.email.value.length<3)
			{
				alert("Please input the address of email.");
				document.enquiry.email.focus();
				return false;
			}

			hasc=false;
			for(var i=0;i<document.enquiry.biznature.length;i++)
			if(document.enquiry.biznature[i].checked)
			{
				hasc=true;

				if(document.enquiry.biznature[i].value=="99" && document.enquiry.biznature_other.value.length<1)
				{
					alert("Please input the business nature because you have checked other.");
					return false;
				}
				
			}
			if(!hasc)
			{
				alert("Please check business nature.");
				return false;	
			}
			return true;
		 }
function openOnRight(url)
{
  parent.document.getElementById('RightFrame').src=url;
}
function openOnRight(url,obj)
{

	  setDefaultLeftLinkBg();
	  obj.style.backgroundColor="#BDB76B";
  	  parent.document.getElementById('RightFrame').src=url;

}
function openOnRight(url,title,obj)
{

	  setDefaultLeftLinkBg();
	  obj.style.backgroundColor="#f2f4ee";
	  parent.document.getElementById('RightFrame').src=url;
	  parent.document.getElementById('pageName').innerHTML="<font  style='font-size: 15px;font-weight: bold;font-family: Arial,sans-serif;'>"+title+" </font>";
}
function setDefaultLeftLinkBg()
{

	var allleft=document.getElementsByTagName("label");
	for(var i=0;i<allleft.length;i++)
	{
			allleft[i].style.backgroundColor="#e5d9c5";
	}
	// 左侧变化时，上面为未选状态
	for(var i=0;i<=6;i++){
		//parent.document.getElementsByTagName("IFRAME")[1].getElementById('mainlink'+i).style.backgroundColor="#CCCCCC";
		parent.frames["topframe"].document.getElementById('mainlink'+i).style.backgroundColor="#Cbbfab";

		//alert(parent.frames["topframe"].document.getElementById('mainlink'+i));
		}

		parent.frames["topframe"].document.getElementById('mainlink2').style.backgroundColor="#e5d9c5";

}
