/*function totals(q1,p1,t1){
	//alert(q1);
	var getEvent=event.keyCode;
		 if (getEvent == "13" && document.getElementById(q1).value <= 1) {
		 document.getElementById(q1).value = 1;
	 } 
	 
	var x=document.getElementById(q1).value;
	var a = document.getElementById(p1).value;
	var sum = x*a ;
	document.getElementById(t1).value= sum.toFixed(2);
	
	var totalprice = 0;
	var num = 4;
	for(i=1;i<=num;i++){
			if(document.getElementById("data["+i+"][checkbox]").checked == true ){
				totalprice = parseFloat(totalprice) + parseFloat(document.getElementById("data["+i+"][totalprice]").value);
			}
		}
		document.getElementById("total").value = totalprice;
}*/

/*function updateform(num){
	var qty = 1;
	for(i=1;i<=num;i++){
	var DX = document.getElementById("data["+i+"][qty]").value;	
	if (DX <= 1){
		qty = 1;
		document.getElementById("data["+i+"][qty]").value = qty;
	}else{
	
		qty = document.getElementById("data["+i+"][qty]").value;
	}
	
	var sum = qty * document.getElementById("data["+i+"][price]").value;
	document.getElementById("data["+i+"][totalprice]").value= sum.toFixed(2);
	}
	
	var totalprice = 0;
	var num = 4;
	for(i=1;i<=num;i++){
			if(document.getElementById("data["+i+"][checkbox]").checked == true ){
				totalprice = parseFloat(totalprice) + parseFloat(document.getElementById("data["+i+"][totalprice]").value);
			}
		}

		document.getElementById("total").value = totalprice;
}*/

/*function checktotalprice(num){
	var tatalprice =0;
	updateform(num);
	for(i=1;i<=num;i++){
		
		if(document.getElementById("data["+i+"][checkbox]").checked == true ){
			tatalprice = parseFloat(tatalprice) + parseFloat(document.getElementById("data["+i+"][totalprice]").value);
		}
	}
	if(tatalprice <= 1){
		return 0;
	}else{
		return 1;
	}
}
*/

/*function submitform(){
	
	var msg ='';
	if(document.getElementById("Fname").value ==''){
		msg +='*First Name \r\n';
	}
	if(document.getElementById("Lname").value ==''){
		msg +='*Last Name \r\n';
	}
	if(document.getElementById("Email").value ==''){
		msg +='*Email \r\n';
	}
	if(document.getElementById("age").value ==''){
		msg +='*Age \r\n';
	}
	if(document.getElementById("gender").value ==''){
		msg +='*Gender \r\n';
	}
	if(document.getElementById("nationality").value ==''){
		msg +='*nationality \r\n';
	}
	if(document.getElementById("country").value ==''){
		msg +='*country \r\n';
	}
	
		
	if(msg != ''){
		msg ='Please insert \r\n'+msg;
		alert(msg);
	}else{
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if(!filter.test(document.getElementById("Email").value)){
			msg ='Invalid Email Address \r\n';
			alert(msg);
		}else{

			if(checktotalprice(4) != 0){
				document.getElementById("order_form").submit();
			}else{
				alert('Please Order more than $499');
			}
		}
		
	}
	
}*/

/*function onclickbox_(){
	var totalprice = 0;
	var num = 4;
	for(i=1;i<=num;i++){
			if(document.getElementById("data["+i+"][checkbox]").checked == true ){
				totalprice = parseFloat(totalprice) + parseFloat(document.getElementById("data["+i+"][totalprice]").value);
			
			}
		}
	document.getElementById("total").value = totalprice;
}
*/

function validateContact(){
	
var testresults;
var line = document.myform.hdnMaxLine.value;
var strFname = document.myform.Fname.value;
var strLname = document.myform.Lname.value;
var strEmail = document.myform.Email.value;
var strAge = document.myform.age.value;
var strGender = document.myform.gender.value;
var strNationality = document.myform.nationality.value;
var strsecuritycode = document.myform.securitycode.value;
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
var telnum=/[\d\D]+$/;

if(strFname != "" && strLname != ""  && strEmail != "" && strsecuritycode != "" && strAge != "" && strGender != "" && strNationality != ""  )
{
	testresults=true;
	
	if (!telnum.test(strsecuritycode))
	{
		alert("Security Code is incorrect!");
		testresults=false;
	}
	if (!filter.test(strEmail))
	{
		alert("Please input a valid email address!");
		testresults=false;
	}	
}
else
{
	var strAlert = "Please fill in your";
	if(strFname == "")
	{
		strAlert = strAlert + " - First Name";
	}
	if(strLname == "")
	{
		strAlert = strAlert + " - Last Name";
	}
	
	if(strEmail == "")
	{
		strAlert = strAlert + " - Email";
	}
	if(strAge == "")
	{
		strAlert = strAlert + " - Age";
	}
	if(strGender == "")
	{
		strAlert = strAlert + " - Gender";
	}
	
	if(strNationality == "")
	{
		strAlert = strAlert + " - Nationality";
	}
	
	if(strsecuritycode == "")
	{
		strAlert = strAlert + " - Security Code";
	}
	
	alert(strAlert);
	testresults=false;
}
	
	for(var i=1; i<=line; i++){
		if(document.getElementById("name"+i).value == "" ){
			alert("You did not fill Section B in fields Name.");
			testresults=false;
		}
		if(document.getElementById("aged"+i).value == "" ){
			alert("You did not select Section B in fields Age.");
			testresults=false;
		}
		if(document.getElementById("gen"+i).value == "" ){
			alert("You did not select Section B in fields Gender.");
			testresults=false;
		}
		if(document.getElementById("nat"+i).value == "" ){
			alert("You did not fill Section B in fields Nationality.");
			testresults=false;
		}
		if(document.getElementById("cr"+i).value == "" ){
			alert("You did not select Section B in fields Country of Residence.");
			testresults=false;
		}
	}
	
	return (testresults);
}

function validate(){
	
var chkTravel = document.getElementById("travel_care");
var radioTravel1 = document.getElementById("travel1");
var radioTravel2 = document.getElementById("travel2");
var chkPacare = document.getElementById("pa_care");
var chkJob = document.getElementById("job");

	if(chkTravel.checked == true){
		
		if(radioTravel1.checked == true ){
			
			if(document.getElementById("travelPolicy1").checked == false && document.getElementById("travelPolicy2").checked == false && document.getElementById("travelPolicy3").checked == false ){
				alert("Please choose travel Policy.");
				return false;
			}
			
		}else if (radioTravel2.checked == true){
			
			if(document.getElementById("travelPolicy4").checked == false && document.getElementById("travelPolicy5").checked == false && document.getElementById("travelPolicy6").checked == false){
				alert("Please choose travel Policy.");
				return false;
			}
			
		}else {
			alert("Please choose travel Policy.");
			return false;			
		}
	}
	
	
	if(chkPacare.checked == true){
		
		if(chkJob.value == "" ){
				alert("Please choose Occupation.");
				return false;
			}
	}

}

function showhide(layer_ref,input_name) {
	
	if(document.getElementById(input_name).checked == true ){
		display(layer_ref);
	}else{
		hide(layer_ref);
		if(input_name=="travel_care"){
			
			var total = parseFloat(document.getElementById("total_Price").value)-
			parseFloat(document.getElementById("pricetravel").value );
			
			document.getElementById("total_Price").value = total.toFixed(2);
			
			document.getElementById("num").value = 0;
			document.getElementById("pricetravel").value = 0;
			document.getElementById("travel1").checked = false;
			document.getElementById("travel2").checked = false;
			hide("box_content1");
			hide("box_content2");
			hide("travel_price");
			
			for(var i=1; i<=6; i++){
			  document.getElementById("travelPolicy"+i).checked = false;
			}
		}
		
		if(input_name=="pa_care"){	
		
			var total = parseFloat(document.getElementById("total_Price").value)-
			parseFloat(document.getElementById("paPrice").value);
			
			document.getElementById("total_Price").value = total.toFixed(2);

			document.getElementById("div3").style.display = "none";
			document.getElementById("warning").style.display = "none";
			document.getElementById("div_pa_price").style.display = "none";			
			document.getElementById("paPrice").value = 0;
			document.getElementById("class").value = "";
			document.getElementById("job").value = "";
		}
	}
} 
	
function display(sID) {
oObj = document.getElementById(sID);
if (oObj) {
oObj.style.display='block';
}

}

function hide(sID) {
oObj = document.getElementById(sID);
if (oObj) {
oObj.style.display='none';
}
}

function gettab(id){
	
for (i=1;i<=10;i++)
	{
		if(id < 3){
			if (id == i)
			{
				display("box_content"+i);
			}else{
				hide("box_content"+i);
			}
		} else {
			if (id == i)
			{
				display("detail"+i);
			}else{
				hide("detail"+i);
			}
		}
	}

}

function gethidetab(id){
	
	for (i=1;i<=20;i++)
	{
		if (id == i)
		{
			display("box_content"+i);
		}else{
			hide("box_content"+i);
		}
	}
	document.getElementById('price').value = '0.00';
}

function popup(url,name,windowWidth,windowHeight){   

	myleft=(screen.width)?(screen.width-windowWidth)/2:100;  
	mytop=(screen.height)?(screen.height-windowHeight)/2:100;    
	properties = "width="+windowWidth+",height="+windowHeight; 
	properties +=",scrollbars=yes, top="+mytop+",left="+myleft;
	window.open(url,name,properties); 
	
}

function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}

function onclickradio(val){
	var totalprice = 0
	var num = document.getElementById("num").value;
	var i = val;

	if(num > 0 ){
		
		totalprice = parseFloat(document.getElementById("total_Price").value)+
		parseFloat(document.getElementById("travelPolicy"+i).value)-
		parseFloat(document.getElementById("travelPolicy"+num).value); 
		document.getElementById("pricetravel").value = document.getElementById("travelPolicy"+i).value;
		
	} else {	
	
		totalprice = parseFloat(document.getElementById("total_Price").value) +
		parseFloat(document.getElementById("travelPolicy"+i).value);
		document.getElementById("pricetravel").value = document.getElementById("travelPolicy"+i).value;
		
	}	
	
	display("travel_price");
	hide("family1");
	hide("family2");
	
	if(i == "1"){document.getElementById("travelType").value = "Travel (Policy Holder Only)";}
	if(i == "2"){document.getElementById("travelType").value = "Travel (Policy Holder Spouse)";}
	if(i == "3"){
		display('family1');
		document.getElementById("travelType").value = "Travel (Policy Holder Family)";
	}
	
	if(i == "4"){document.getElementById("travelType").value = "Travel + Winter Sports (Policy Holder Only)";}
	if(i == "5"){document.getElementById("travelType").value = "Travel + Winter Sports (Policy Holder Spouse)";}
	if(i == "6"){
		display('family2');
		document.getElementById("travelType").value = "Travel + Winter Sports (Policy Holder Family)";
	}
	
	document.getElementById("num").value = i;
	document.getElementById("total_Price").value = totalprice.toFixed(2);		
	
}
			
function onclickbox(val){
	
	var num = val+2;
	var totalprice =0;
	var price =0;
	
	for(var i=1;i<num;i++){
		
		var global = document.getElementById("annaulG"+i).value;
		var patient = 0;
		var denteal = 0;
		
		if(document.getElementById("patient_care").checked == true ){			
			document.getElementById("o_plan"+i).value = document.getElementById("annaulO"+i).value;
			patient = document.getElementById("annaulO"+i).value;
			
		} else { 
			document.getElementById("o_plan"+i).value = "-";  
		}

		if(document.getElementById("dental_care").checked == true ){
			document.getElementById("d_plan"+i).value = document.getElementById("annaulD"+i).value;
			denteal = document.getElementById("annaulD"+i).value;
		} else { 
			document.getElementById("d_plan"+i).value = "-"; 
		}
				
		price = parseFloat(global ) +
			parseFloat(patient) + 
			parseFloat(denteal);
			
		document.getElementById("price"+i).value = price.toFixed(2);
		
		totalprice = parseFloat(totalprice) +
			parseFloat(document.getElementById("price"+i).value);
			
		document.getElementById("total_Price").value = totalprice.toFixed(2);
	}		
		
		

}

function onchangeddl(){
	
	display('div_pa_price');	
	var pa_Price = document.getElementById("paPrice").value;
	var price = 0;	
	
	if(document.getElementById("job").value == "5" ){
		price = 0.00;
		document.getElementById("class").value = "Class 5";
		document.getElementById("warning").style.display = "block";		
		
	} else if(document.getElementById("job").value == "4"){	
		price = 450.00;   
		document.getElementById("class").value = "Class 4";
		document.getElementById("warning").style.display = "none";
		
	} else if(document.getElementById("job").value == "3"){	
		price = 300.00;   
		document.getElementById("class").value = "Class 3";
		document.getElementById("warning").style.display = "none";

	} else if(document.getElementById("job").value == "2"){	
		price = 300.00;   
		document.getElementById("class").value = "Class 2";
		document.getElementById("warning").style.display = "none";
		
	} else if(document.getElementById("job").value == "1"){	
		price = 375.00;   
		document.getElementById("class").value = "Class 1";
		document.getElementById("warning").style.display = "none";
	} 
	
	document.getElementById("paPrice").value = price.toFixed(2);   
	
	totalprice = parseFloat(document.getElementById("total_Price").value)+
	parseFloat(document.getElementById("paPrice").value);
	document.getElementById("total_Price").value = totalprice.toFixed(2);
}

/*function onchangeddl1(){
	var totalprice = 0;
	
	if(document.getElementById("ddlTravel").value == "Travel (Individual)" )
	{	document.getElementById("price").value = "200.00";   } else
		
	if(document.getElementById("ddlTravel").value == "Travel (Couple)" )
	{	document.getElementById("price").value = "350.00";   } else
		
	if(document.getElementById("ddlTravel").value == "Travel (Family)" )
	{	document.getElementById("price").value = "425.00";   } 
		
}*/

/*function onchangeddl2(){
	var totalprice = 0;
		
	if(document.getElementById("ddlTravelPlus").value == "Travel Plus Winter Sports (Individual)" )
	{	document.getElementById("price").value = "250.00";   } else
		
	if(document.getElementById("ddlTravelPlus").value == "Travel Plus Winter Sports (Couple)" )
	{	document.getElementById("price").value = "437.50";   } else
		
	if(document.getElementById("ddlTravelPlus").value == "Travel Plus Winter Sports (Family)" )
	{	document.getElementById("price").value = "531.25";   }
		
}
*/

/*function returnTextBox1(val){
	var totalprice = 0;
	var num = val;
	var i;
	for(i = 0 ; i<=val ; i++ ){
		
		if(document.getElementById("chk["+i+"][checkbox]").checked == true ){
			
			opener.window.document.forms['form1'].elements['O_annual'+i].value = document.getElementById("odata["+i+"][checkbox]").value;
			opener.window.document.forms['form1'].elements['O_plan'+i].value = document.getElementById("plan1["+i+"]").value;
			parent.window.opener.display("divOplan"+i);
			parent.window.opener.display("divOannual"+i);
			parent.window.opener.hide("divDplan"+i);
			parent.window.opener.hide("divDannual"+i);


		} else {
			
			opener.window.document.forms['form1'].elements['O_annual'+i].value = '';
			opener.window.document.forms['form1'].elements['O_plan'+i].value = '';
			opener.window.document.forms['form1'].elements['D_annual'+i].value = '';
			opener.window.document.forms['form1'].elements['D_plan'+i].value = '';
			parent.window.opener.hide("divOplan"+i);
			parent.window.opener.hide("divOannual"+i);
			parent.window.opener.hide("divDplan"+i);
			parent.window.opener.hide("divDannual"+i);

			
		}
		totalprice = parseFloat(totalprice) + 
		parseFloat(document.getElementById("odata["+i+"][checkbox]").value) + 
		parseFloat(opener.window.document.forms['form1'].elements['G_annual'+i].value);
	}
	
	opener.window.document.forms['form1'].elements['antotal'].value = totalprice.toFixed(2);
	parent.window.opener.display("box_content2");
	parent.window.opener.hide("box_content1");

	//parent.window.opener.form1.antotal.value = totalprice.toFixed(2);
	opener.focus();
	parent.window.close();
	
}*/

/*function returnTextBox2(val){
	var totalprice = 0;
	var num = val;
	var i;
	for(i = 0 ; i<=val ; i++ ){
		
		if(document.getElementById("chk["+i+"][checkbox]").checked == true ){
			
			opener.window.document.forms['form1'].elements['O_annual'+i].value = document.getElementById("odata["+i+"][checkbox]").value;
			opener.window.document.forms['form1'].elements['O_plan'+i].value = document.getElementById("plan1["+i+"]").value;
			parent.window.opener.display("divOplan"+i);
			parent.window.opener.display("divOannual"+i);

		} else {
			
			opener.window.document.forms['form1'].elements['O_annual'+i].value = '';
			opener.window.document.forms['form1'].elements['O_plan'+i].value = '';
			parent.window.opener.hide("divOplan"+i);
			parent.window.opener.hide("divOannual"+i);
			parent.window.opener.hide("divDplan"+i);
			parent.window.opener.hide("divDannual"+i);
			
		}
		totalprice = parseFloat(totalprice) + 
		parseFloat(document.getElementById("odata["+i+"][checkbox]").value) + 
		parseFloat(opener.window.document.forms['form1'].elements['G_annual'+i].value);
	}
	opener.window.document.forms['form1'].elements['antotal'].value = totalprice.toFixed(2);
	document.forms['outpatiant'].submit();
}
*/

/*function returnTextBox3(val){
	var totalprice = 0;
	var num = val;
	var i;
	for(i = 0 ; i<=val ; i++ ){
		
		if(document.getElementById("chk["+i+"][checkbox]").checked == true ){
			
			opener.window.document.forms['form1'].elements['D_annual'+i].value = document.getElementById("odata["+i+"][checkbox]").value;
			opener.window.document.forms['form1'].elements['D_plan'+i].value = document.getElementById("plan1["+i+"]").value;
			parent.window.opener.display("divDplan"+i);
			parent.window.opener.display("divDannual"+i);

			
		} else {
			
			opener.window.document.forms['form1'].elements['D_annual'+i].value = '';
			opener.window.document.forms['form1'].elements['D_plan'+i].value = '';
			parent.window.opener.hide("divDplan"+i);
			parent.window.opener.hide("divDannual"+i);
			
		}
		totalprice = parseFloat(totalprice) + 		
		parseFloat(document.getElementById("odata["+i+"][checkbox]").value) ;
		
	}
	
	var values = totalprice + parseFloat(opener.window.document.forms['form1'].elements['antotal'].value);
	
	opener.window.document.forms['form1'].elements['antotal'].value = values.toFixed(2);
	parent.window.opener.display("box_content2");
	parent.window.opener.hide("box_content1");

	opener.focus();
	parent.window.close();
}*/

/*function returnTextBox4(val){
	var totalprice = 0;
	var num = val;
	var i;
	for(i = 0 ; i<=val ; i++ ){
		
		if(document.getElementById("chk["+i+"][checkbox]").checked == true ){
			
			opener.window.document.forms['form1'].elements['D_annual'+i].value = document.getElementById("odata["+i+"][checkbox]").value;
			opener.window.document.forms['form1'].elements['D_plan'+i].value = document.getElementById("plan1["+i+"]").value;
			parent.window.opener.display("divDplan"+i);
			parent.window.opener.display("divDannual"+i);

			
		} else {
			
			opener.window.document.forms['form1'].elements['D_annual'+i].value = '';
			opener.window.document.forms['form1'].elements['D_plan'+i].value = '';
			parent.window.opener.hide("divDplan"+i);
			parent.window.opener.hide("divDannual"+i);
			
		}
		totalprice = parseFloat(totalprice) + 		
		parseFloat(document.getElementById("odata["+i+"][checkbox]").value) ;
		
	}
	
	var values = totalprice + parseFloat(opener.window.document.forms['form1'].elements['antotal'].value);
	
	opener.window.document.forms['form1'].elements['antotal'].value = values.toFixed(2);
	document.forms['dental'].submit();
}*/

/*function returnTextBox5(){	
	var totalprice = 0;
	
	if(document.getElementById("travel1").checked == true){
		
	opener.window.document.forms['form1'].elements['T_annual'].value = document.forms['premiums'].elements['price'].value;
	opener.window.document.forms['form1'].elements['T_plan'].value = document.getElementById("ddlTravel").value;
	parent.window.opener.display("divTravel");
	
	} else if(document.getElementById("travel2").checked == true){
		
	opener.window.document.forms['form1'].elements['T_annual'].value = document.forms['premiums'].elements['price'].value;
	opener.window.document.forms['form1'].elements['T_plan'].value = document.getElementById("ddlTravelPlus").value;
	parent.window.opener.display("divTravel");
	
	} else {
		
	opener.window.document.forms['form1'].elements['T_annual'].value = '0.00';
	opener.window.document.forms['form1'].elements['T_plan'].value = '';
	parent.window.opener.hide("divTravel");
	
	}

	parent.window.opener.display("box_content2");
	parent.window.opener.hide("box_content1");
	
	totalprice = parseFloat(totalprice) + parseFloat(opener.window.document.forms['form1'].elements['T_annual'].value) + parseFloat(opener.window.document.forms['form1'].elements['antotal'].value);
	
	opener.window.document.forms['form1'].elements['antotal'].value = totalprice.toFixed(2);
	opener.focus();
	parent.window.close();
}
*/

/*function closepopup() {
	opener.focus();
	parent.window.close();

}*/

function CreateNewRow()
{
	display('div3');
	var intLine = parseInt(document.myform.hdnMaxLine.value);
	intLine++;
	
	var theTable = document.getElementById("tbExp");
	var newRow = theTable.insertRow(theTable.rows.length);
	newRow.id = newRow.uniqueID;
	
	var newCell;
	
	//*** Column no ***//
	newCell = newRow.insertCell(0);
	newCell.id = newCell.uniqueID;
	newCell.innerHTML = intLine;
	
	//*** Column name ***//
	newCell = newRow.insertCell(1);
	newCell.id = newCell.uniqueID;
	newCell.innerHTML = "<input type=\"text\" name=\"name"+intLine+"\"  id=\"name"+intLine+"\" value=\"\" style=\"width: 200px\">";
	
	//*** Column age ***//
	newCell = newRow.insertCell(2);
	newCell.id = newCell.uniqueID;
	newCell.innerHTML = "<select name=\"aged"+intLine+"\" id=\"aged"+intLine+"\" style=\"width:85px\"></select>";
	ageSelection("aged"+intLine);
	
	//*** Column gen ***//
	newCell = newRow.insertCell(3);
	newCell.id = newCell.uniqueID;
	newCell.innerHTML = "<select name=\"gen"+intLine+"\" id=\"gen"+intLine+"\" style=\"width:75px\"></select>";
	genSelection("gen"+intLine);

	//*** Column nat ***//
	newCell = newRow.insertCell(4);
	newCell.id = newCell.uniqueID;
	newCell.innerHTML = "<input type=\"text\" name=\"nat"+intLine+"\"  id=\"nat"+intLine+"\" value=\"\" style=\"width: 120px\" />";

	//*** Column cr ***//
	newCell = newRow.insertCell(5);
	newCell.id = newCell.uniqueID;
	newCell.innerHTML = "<select name=\"cr"+intLine+"\" id=\"cr"+intLine+"\" style=\"width: 220px\"></select>";
	crSelection("cr"+intLine);
	
	document.myform.hdnMaxLine.value = intLine;

}

function ageSelection(ele){
	
	var objSelect = document.getElementById(ele);
	
	var Item = new Option("--select--", ""); 
	objSelect.options[objSelect.length] = Item;
		
	var arr_item = new Array("0 to 17","18 to 24","25 to 29","30 to 34","35 to 39","40 to 44","45 to 49","50 to 54","55 to 59","60 to 64");
	var arr_item_value = new Array("1","2","3","4","5","6","7","8","9","10");
	
	for(var i = 0; i< arr_item.length; i++){
		
		var Item = new Option(arr_item[i],arr_item_value[i]); 
		objSelect.options[objSelect.length] = Item;
		
	}
}

function genSelection(ele){
	
	var objSelect = document.getElementById(ele);
	
	var Item = new Option("--select--", ""); 
	objSelect.options[objSelect.length] = Item;
	
	var Item = new Option("Male", "Male"); 
	objSelect.options[objSelect.length] = Item;
	
	var Item = new Option("Female", "Female"); 
	objSelect.options[objSelect.length] = Item;

}
	
function crSelection(ele){
	
var objSelect = document.getElementById(ele);
var Item = new Option("--select--", ""); 
objSelect.options[objSelect.length] = Item;

var arr_item = new Array("Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo, The Democratic Republic of The","Cook Islands","Costa Rica","Cote D'ivoire","Croatia","Cuba","Curacao","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Dutch Antilles","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guinea","Guinea-bissau","Guyana","Haiti","Heard Island and Mcdonald Islands","Holy See (Vatican City State)","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran, Islamic Republic of","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, Democratic People's Republic of","Korea, Republic of","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macao","Macedonia, The Former Yugoslav Republic of","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia, Federated States of","Moldova, Republic of","Monaco","Mongolia","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestinian Territory, Occupied","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Pierre and Miquelon","Saint Vincent and The Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and The South Sandwich Islands","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syrian Arab Republic","Taiwan, Province of China","Tajikistan","Tanzania, United Republic of","Thailand","Timor-leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States of America","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Viet Nam","Virgin Islands, British","Virgin Islands, U.S.","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe");
		
var arr_item_value = new Array("1","1","1","1","1","1","2","1","2","1","1","2","1","1","1","2","1","1","2","1","1","1","1","2","1","1","1","1","1","1","1","1","1","1","1","1","1","2","1","2","1","1","1","1","1","1","1","1","1","1","1","1","1","1","2","2","1","1","1","1","2","2","2","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","2","2","1","1","1","1","1","2","1","1","1","1","1","1","1","1","1","1","1","1","1","2","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","2","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","2","1","1","1","1","1","1","2","2","1","2","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","2","1","1","1","1","1","1","1","1","1","2","1","1","1","1","1","1","1","2","1","1","1","1","1");
	
	for(var i = 0; i< arr_item.length; i++){
		
		var Item = new Option(arr_item[i],arr_item_value[i]); 
		objSelect.options[objSelect.length] = Item;
		
	}

}
