function fixflash(containerID){
var flashContainer = document.getElementById(containerID);
var flashMovie = document.createElement("div");
flashMovie.innerHTML = flashContainer.innerHTML.replace(/</g, "<").replace(/>/g, ">");
flashContainer.parentNode.insertBefore(flashMovie, flashContainer);
flashContainer.parentNode.removeChild(flashContainer);
flashMovie.setAttribute("id",containerID);
}
function changeStyleByLocation(myLocation)
{
	document.getElementById('Location').value = myLocation;
 	var myLocationString = document.getElementById('Location').value;
	if (myLocationString.match('flights.php') == 'flights.php'){
 		changeFlightFrameSrc(myLocationString);
	}
}

function sendVars(){
	if (document.getElementById('Radio1').checked == true){
		var directionString = 'returntravel';
	}
	else {var directionString = 'onewaytravel';}
	var fromString = document.getElementById('txtFrom').value;
	var toString = document.getElementById('txtTo').value;
	var selDayFromString = document.getElementById('selDayFrom').value;
	var selMonFromString = document.getElementById('selMonFrom').value;
	var selTimeFromString = document.getElementById('selTimeFrom').value;
	var selDayToString = document.getElementById('selDayTo').value;
	var selMonToString = document.getElementById('selMonTo').value;
	var selTimeToString = document.getElementById('selTimeTo').value;
	var selAdultString = document.getElementById('selAdult').value;
	var selChildrenString = document.getElementById('selChildren').value;
	var selInfantsString = document.getElementById('selInfants').value;
	var toString = document.getElementById('txtTo').value;
		var myMainString = '?posid=TQ2C&page=requestAirMessage_air&action=airRequest&currency=USD&departCity='+fromString+'&depMonth='+selMonFromString+'&depDay='+selDayFromString+'&depTime='+selTimeFromString+'&returnCity='+toString+'&retMonth='+selMonToString+'&retDay='+selDayToString+'&retTime='+selTimeToString+'&direction='+directionString+'&ADT='+selAdultString+'&INF='+selInfantsString+'&CHD='+selChildrenString+'&classService=CoachClass&actionType=semiFlex&flightType=1';
	var flightsPageLocation = 'http://www.goeurope.co.il/flights.php';
	this.location = flightsPageLocation+myMainString;	
}

function changeFlightFrameSrc(urlToParse){
	//document.getElementById('rightPanel').style.display = 'none';
	var myUrlToParse = urlToParse;
	var myUrlLength = myUrlToParse.length;
	var parsedUrl = myUrlToParse.substring(myUrlToParse.lastIndexOf('?',myUrlLength),myUrlLength);
	var myNewUrlString = 'Https://www.dotres.com/meridia'+parsedUrl;
	document.getElementById('flightsFrame').src = myNewUrlString;
	//document.getElementById('flightsFrame').style.overflowX = 'hidden';
	document.getElementById('flightsFrame').style.scrollbarFaceColor = '#8fc0db';
	document.getElementById('flightsFrame').style.scrollbarHighlightColor = '#d1e9f4';
	document.getElementById('flightsFrame').style.scrollbarArrowColor = '#3585b4';
	document.getElementById('flightsFrame').style.scrollbar3dLightColor = '#8cbed9';
	document.getElementById('flightsFrame').style.scrollbarShadowColor = '#2e82b0';
	document.getElementById('flightsFrame').style.scrollbarDarkshadowColor = '#3585b4';
	document.getElementById('flightsFrame').style.scrollbarTrackColor = '#ddedf5';
}