if (document.getElementById){
	document.write('<style type="text/css">\n');
	document.write('.dropcontent{display:none;}\n');
	document.write('</style>\n');
}	
function contractall(){
	if (document.getElementById) {
		var inc = 0;
		while (document.getElementById("dropmsg"+inc)) {
			document.getElementById("dropmsg"+inc).style.display = "none";
			inc++;
		}
	}
}	
function expandone(){
	if (document.getElementById) {
		var selectedItem=document.frmPage1Of2.cmbCover.selectedIndex;
		//var selectedCountry=document.frmPage1Of2.cmbCountry.selectedIndex;			
		
		//if ((selectedCountry ==2) && (selectedItem ==1))
		//{
		//  selectedItem = selectedItem+6;
		//}				
		contractall();
		document.getElementById("dropmsg"+selectedItem).style.display = "block";
	}
}
	
var newwindow;
function poptastic() {
	newwindow=window.open("ViewBenefits.html","name","scrollbars=yes,height=500,width=650");
	if (window.focus) {newwindow.focus()}
}
function PopupMain()
{
  newwindow=window.open("MainDest.asp","name","scrollbars=no,height=260,width=420");
	if (window.focus) {newwindow.focus()}	
  //var msg;
  //msg = "International Cover Plan:\n";
  //msg = msg+"You must select the Plan designated for your destination. If you have a multiple destination itinerary you should select the Plan for the destination where you spend the majority of your journey overseas, however, it is recommended that you take the highest prevailing cover.";
  //msg = msg+"You must select the Plan designated for your destination.\n";
  //msg = msg+"If you have a multiple destination itinerary you should \n";
  //msg = msg+"select the Plan for the destination where you spend the \n";
  //msg = msg+"majority of your journey overseas, however, it is \n";
  //msg = msg+"recommended that you take the highest prevailing cover.";
 // window.alert(msg);
}

function DepartureOnblur() {
	//cmbDateReturn.Value= cmbDateDeparture.Vavlue;
	var date_start = new Date();
	var dateStr=document.getElementById("cmbDateDeparture").value;
	var dateArray1=new Array(3);
	dateArray1=dateStr.split('/');
	date_start.setFullYear(dateArray1[2]);
	date_start.setMonth(parseInt(dateArray1[1],10) - 1);
	date_start.setDate(dateArray1[0]);
	date_start.setHours(23);
	date_start.setMinutes(59);	  
	var date_end = new Date();
	dateStr=document.getElementById("cmbDateReturn").value;
	var dateArray2=new Array(3);
	dateArray2=dateStr.split("/");
	date_end.setFullYear(dateArray2[2]);
	date_end.setMonth(parseInt(dateArray2[1],10) - 1);
	date_end.setDate(dateArray2[0]);
	date_end.setHours(23);
	date_end.setMinutes(59);    
	if((document.getElementById("cmbDateReturn").value == "")||(date_end < date_start)) {
		document.getElementById("cmbDateReturn").value=document.getElementById("cmbDateDeparture").value;
	}
}	
if (window.addEventListener)
	window.addEventListener("load", expandone, false);
else if (window.attachEvent)
	window.attachEvent("onload", expandone);

