function CreateCities()
	{
	}

	function setupDetails(isReturn)
	{		
		frm = document.forms[0];
		found = false;
						
		if(frm["out"])
		{
			if(frm["out"].length)
				frm["out"][0].checked=true;
			else
				frm["out"].checked=true;
			
			found = true;
		}
		
		if(isReturn=="1")
		{
			if(frm["in"])
			{
				if(frm["in"].length)
					frm["in"][0].checked=true;
				else
					frm["in"].checked=true;
			}
			else
			{
				found = false;
			}
		}	
		
		setFlightDetails(found);		
	}

	function setFlightDetails(found)
	{			
	if (found)
		{
			flightPrice = 0;
			surcharges = 0;
			currency = "";
			isReturnFlight = "0";
			totalIn = 0;
			totalOut = 0;
					
			frm = document.forms[0];
						
			outData = getCheckedData(frm, "out");
			
												
			if(outData!="")
			{
				outDatas = outData.split("|");
				flightPriceOut=outDatas[0];
				surchargesOut=outDatas[1];
				currency = outDatas[4];
				isReturnFlight = outDatas[5];
													
				totalOut = parseFloat(flightPriceOut) + parseFloat(surchargesOut);
				
				tmpTotalOut = totalOut*100;
				tmpTotalOut = Math.round(tmpTotalOut);
				tmpTotalOut = tmpTotalOut/100;
				totalOut = tmpTotalOut.toFixed(2);
				
				document.getElementById("divFlightPriceOut").innerHTML = currency +' ' +flightPriceOut;
				document.getElementById("divSurchargesOut").innerHTML = currency +' ' +surchargesOut;
				document.getElementById("divTotalpriceOut").innerHTML = currency +' ' +totalOut;
				
				document.getElementById("tblIn").style.visibility = "hidden";
			
				if(isReturnFlight=="1")
				{
					inData = getCheckedData(frm, "in");	
					inDatas = inData.split("|");
					flightPriceIn=inDatas[0];
					surchargesIn=inDatas[1];					
					totalIn = parseFloat(flightPriceIn) + parseFloat(surchargesIn);					
					
					tmpTotalIn = totalIn*100;
					tmpTotalIn = Math.round(tmpTotalIn);
					tmpTotalIn = tmpTotalIn/100;
					totalIn = tmpTotalIn.toFixed(2);
					
					document.getElementById("divFlightPriceIn").innerHTML = currency +' ' +flightPriceIn;
					document.getElementById("divSurchargesIn").innerHTML = currency +' ' +surchargesIn;
					document.getElementById("divTotalpriceIn").innerHTML = currency +' ' +totalIn;	
					
					document.getElementById("tblIn").style.visibility = "visible";
				}
						
				total = parseFloat(totalIn) + parseFloat(totalOut);				
				tmpTotal = total *100;
				tmpTotal= Math.round(tmpTotal);
				tmpTotal= tmpTotal/100;
				total  = tmpTotal.toFixed(2);
				
				document.getElementById("divPageTotalPrice").innerHTML = currency +' ' +total;		
			}
		}
	}
	function getFlightNumber() 
	{
		frm = document.forms[0];
		
		var outFlightData = "";
		outFlightData = getCheckedData(frm, "out");
		var inFlightData = "";
		inFlightData = getCheckedData(frm, "in");
			
		var outDatas;
		var inDatas;
		
		if (outFlightData != "")
		{
			outDatas = outFlightData.split("|");
		}
		if (inFlightData != "")
		{
			inDatas = inFlightData.split("|");
		}
		
		if (inFlightData != "")
		{
			//alert(outDatas[2] + "|" + outDatas[6] + "|" + inDatas[2] + "|" + inDatas[6]);
			return outDatas[2] + "|" + outDatas[6] + "|" + inDatas[2] + "|" + inDatas[6];
		}
		else
		{
			return outDatas[2] + "|" + outDatas[6];
		}
	}
	function getCheckedData(frm,radioName)
	{	
		
		//radio = frm(radioName);		
		radio = frm[radioName];		
		
		if (radio != null)
		{
			hid = frm[radioName +"hidItem"];				
			
			if(!radio.length)
				{		
				if(!hid.length)
					return frm[radioName +"hidItem"].value;
				
				return hid[hid.length-1].value;			
				}		
			
			for(i=0;i<radio.length;i++)
				{					
				if(radio[i].checked)
					{				
					return hid[i].value;
					}
				}				
		}
		
		return "";		 
	}

