function creatsel(selname,stroption,opt)
    {document.write("<select name='"+selname+"' id='"+selname+"'></select>");	
	temparr=stroption.split(",")  
	
	
     for (i=0;i<temparr.length; i++)
        {
             document.form1.country.options[document.form1.country.length] = new Option(temparr[i],i);  
			 if(opt==temparr[i])document.form1.country.selectedIndex=i;              
        }
	}
function checkdata() {
if( form1.sex.value =="") {
alert("Please choose the sex Option,thank you!");
return false;
}
if( form1.firstname.value =="" || form1.firstname.value.length<2) {
alert("Name must be filled!");
return false;
}


if( isNumberString(form1.usermail.value,"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@.-")!=1 || form1.usermail.value.length<8) {
alert("E-mail is error");
form1.usermail.focus();
return false;
}
if(form1.streetaddress.value==""){
alert("Street Address must be filled!");
form1.streetaddress.focus();
return false;
}
if(form1.zip.value==""){
alert("zip code must be filled!");
form1.zip.focus();
return false;
}
if(form1.city.value==""){
alert("City must be filled!");
form1.city.focus();
return false;
}


if(form1.country.value==""){
alert("Please select the country,thank you!");
form1.country.focus();
return false;
}
if(form1.telephone.value==""){
alert("Telephone must be filled!");
return false;
}
if(form1.paymentvia.value==""){
alert("Please select Payment!");
form1.paymentvia.focus();
return false;
}
return true;
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++)  {
	TempChar= InString.substring (Count, Count+1);
	if (RefString.indexOf (TempChar, 0)==-1)  
	return (false);
}
return (true);
}