/*按比例生成缩略图*/
function DrawImage(ImgD,W,H){ 
  var flag=false; 
  var image=new Image(); 
  image.src=ImgD.src; 
  if(image.width>0 && image.height>0){ 
    flag=true; 
    if(image.width/image.height>= W/H){ 
      if(image.width>W){
        ImgD.width=W; 
        ImgD.height=(image.height*H)/image.width; 
      }
	  else{ 
        ImgD.width=image.width;
        ImgD.height=image.height; 
      } 
      ImgD.alt= ""; 
    } 
    else{ 
      if(image.height>H){
        ImgD.height=H; 
        ImgD.width=(image.width*W)/image.height; 
      }
	  else{ 
        ImgD.width=image.width;
        ImgD.height=image.height; 
      } 
      ImgD.alt=""; 
    } 
  }
}

function time1()
{
	var today=new Date();
	var str=today.getYear()+"-";
	str+=(today.getMonth()+1)+"-";
	str+=today.getDate()+"&nbsp;&nbsp;&nbsp;&nbsp; ";
	var st=today.getDay();
	switch(st)
	{
		case 0:
			w1="Sunday";break;
		case 1:
			w1="Monday";break;
		case 2:
			w1="Tuesday";break;
		case 3:
			w1="Wednesday";break;
		case 4:
			w1="Thursday";break;
		case 5:
			w1="Friday";break;
		case 6:
			w1="Saturday";break;
	}
	
	document.getElementById("nowtime").innerHTML=str+" "+w1;
	
}

function checkindex(){
	var fro=document.forms['subm'];
	if(fro.elements['email'].value==""){
		alert("email full");
		return false;
	}
	if(fro.elements['lname'].value==""){
		alert("name full");
		return false;
	}
	if(fro.elements['company'].value==""){
		alert("company full");
		return false;
	}else{
		return true;	
	}
}