function k(obj){
	return document.getElementById(obj);
}
function ShowNav(obj){
	k(obj).style.color="#0F873F";
	k(obj).style.lineheight="28px";
	k(obj).style.display="block";
	k(obj).style.backgroundImage="url(img/navhover.jpg)";
	k(obj).style.backgroundPosition="center";
	k(obj).style.backgroundRepeat="no-repeat";
}
var flag=false;
function DrawImage(ImgD,iwidth,iheight){
    //参数(图片,允许的宽度,允许的高度)
    var image=new Image();
    image.src=ImgD.src;
    if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= iwidth/iheight){
        if(image.width>iwidth){  
        ImgD.width=iwidth;
        ImgD.height=(image.height*iwidth)/image.width;
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        ImgD.alt=image.width+"×"+image.height;
        }
    else{
        if(image.height>iheight){  
        ImgD.height=iheight;
        ImgD.width=(image.width*iheight)/image.height;        
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        ImgD.alt=image.width+"×"+image.height;
        }
    }
} 

function Manage(){
	var Obj=document.myform;
	if(Obj.Person.value == "" ) 
		{
			alert("Please fill in your name");
			Obj.Person.focus();
			return false;
		}
	if(Obj.email.value == "" ) 
		{
			alert("Please fill in your E-mail");
			Obj.email.focus();
			return false;
		}
	if(Obj.Theme.value == "" ) 
		{
			alert("Please fill in your Message Theme");
			Obj.Theme.focus();
			return false;
		}
//	if(Obj.Content.value == "" ) 
//		{
//			alert("Please fill in your Message Content");
//			Obj.Content.focus();
//			return false;
//		}
}
function CNManage(){
	var Obj=document.myform;
	if(Obj.Person.value == "" ) 
		{
			alert("请填写您的名字");
			Obj.Person.focus();
			return false;
		}
	if(Obj.email.value == "" ) 
		{
			alert("请填写您E-mail");
			Obj.email.focus();
			return false;
		}
	if(Obj.Theme.value == "" ) 
		{
			alert("请填写您的标题");
			Obj.Theme.focus();
			return false;
		}
//	if(Obj.Content.value == "" ) 
//		{
//			alert("请填写您的信息内容");
//			Obj.Content.focus();
//			return false;
//		}
}

function Manage3(){
	var Obj=document.myform;
	if(Obj.Person.value == "" ) 
		{
			alert("请填写您的名字");
			Obj.Person.focus();
			return false;
		}
	if(Obj.email.value == "" ) 
		{
			alert("请填写您的E-mail");
			Obj.email.focus();
			return false;
		}
	if(Obj.Theme.value == "" ) 
		{
			alert("请填写您的标题");
			Obj.Theme.focus();
			return false;
		}
//	if(Obj.Content.value == "" ) 
//		{
//			alert("请填写您的意见");
//			Obj.Content.focus();
//			return false;
//		}
}
function Manage2(){
	var Obj=document.myform;
	if(Obj.Person.value == "" ) 
		{
			alert("Please fill in your name");
			Obj.Person.focus();
			return false;
		}
	if(Obj.email.value == "" ) 
		{
			alert("Please fill in your E-mail");
			Obj.email.focus();
			return false;
		}
	if(Obj.Theme.value == "" ) 
		{
			alert("Please fill in your Theme");
			Obj.Theme.focus();
			return false;
		}
//	if(Obj.Content.value == "" ) 
//		{
//			alert("Please fill in your Message Content");
//			Obj.Content.focus();
//			return false;
//		}
}
