// JavaScript Document
var Countries = ['AU','AT','BE','CA','DK','FI','FR','DE','GB','GR','IE','IT','JP','LU','MT','MX','MC','NL','NZ','NO','PT','ES','SE','CH','UK','US'];
function check(form){
	var email=form.email.value;
	var on1_1=form.on1_1.value;
	var on1_2=form.on1_2.value;
	var on1_3=form.on1_3.value;
	var on1_4=form.on1_4.value;
	var text='Please enter correct IMEI number of your mobile phone\nType *#06# on phone\'s keyboard (* Asterisk)\nOnly 15 digits allowed! No space or dashes.';
	var text1='        Invalid e-mail address!\nPlease enter correct e-mail address.';
	var text3='Please select Phone model.';
	var text4='Please select Country.';
	var text5='Please select Purchase Option.';
	var text6='Please select Cable Option.';
	var text7='Cable Pack is not available for this country!\nWe suggest you to obtain a compatible data cable from a local seller,\nThen you can still use our service after obtained your cable.';
	var text8='You can not use this service if you do not have a compatible data cable!\nYou can order Cable Pack Alternatively.';
	var text9='You can not use this service with this type of data cable!\nYou can order Cable Pack Alternatively.';

	if (on1_1 == 'none' || on1_1 == ''){
	 alert(text3);
		form.on1_1.focus();
	    	return false;}
	else if (on1_2 == 'none'){
	 alert(text4);
		form.on1_2.focus();
	    	return false;}
	else if (on1_3 == 'none'){
	 alert(text5);
		form.on1_3.focus();
	    	return false;}
	else if (on1_4 == 'none'){
	 alert(text6);
		form.on1_4.focus();
	    	return false;}  
	    	  	
    	else if (email == '' || email.length < 5 || email.indexOf('@') == -1){
	alert(text1);
		form.email.focus();
	    	return false;}
	else if (on1_3 == 'Cable Pack'){
	for(i=0;i<Countries.length;i+=1){
	if (on1_2==Countries[i])
	return true;
	}
	alert(text7);
	form.on1_3.focus();
	return false;
	}     	
	else if (on1_4 == 'No'){
	alert(text8);
	form.on1_3.focus();
	return false;
	}
	else if (on1_4 == 'No1'){
	alert(text9);
	form.on1_3.focus();
	return false;}    
	else return true;}