var isIE;if(navigator.appName=="Microsoft Internet Explorer"){isIE=true;}
if(navigator.appName=="MSIE"){isIE=true;}
function loadMovie(src,h,w,fvars){var text="";if(isIE){text='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';text=text+'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" ';text=text+'width="'+w+'" height="'+h+'">';text=text+'<param name="movie" value="'+src+'" />';text=text+'<param name="allowScriptAccess" value="sameDomain" />';text=text+'<param name="wmode" value="opaque" />';text=text+'<param name="quality" value="high" />';if(fvars.length>0){text=text+'<param name="FlashVars" value="'+fvars+'" />';}
text=text+'</object>';}else{text='<embed src="'+src+'" ';text=text+'quality="high" ';text=text+'pluginspage="//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ';text=text+'type="application/x-shockwave-flash" ';text=text+'width="'+w+'" height="'+h+'" ';text=text+'allowscriptaccess="samedomain" ';text=text+'wmode="opaque"';if(fvars.length>0){text=text+' flashvars="'+fvars+'"';}
text=text+'></embed>';}
document.write(text);}
function loadMovieFS(src,h,w,fvars){var text="";if(isIE){text='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';text=text+'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" ';text=text+'width="'+w+'" height="'+h+'">';text=text+'<param name="movie" value="'+src+'" />';text=text+'<param name="allowScriptAccess" value="sameDomain" />';text=text+'<param name="allowfullscreen" value="true" />';text=text+'<param name="wmode" value="opaque" />';text=text+'<param name="quality" value="high" />';if(fvars.length>0){text=text+'<param name="FlashVars" value="'+fvars+'" />';}
text=text+'</object>';}else{text='<embed src="'+src+'" ';text=text+'quality="high" ';text=text+'pluginspage="//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ';text=text+'type="application/x-shockwave-flash" ';text=text+'width="'+w+'" height="'+h+'" ';text=text+'allowscriptaccess="samedomain" ';text=text+'allowfullscreen="true" ';text=text+'wmode="opaque"';if(fvars.length>0){text=text+' flashvars="'+fvars+'"';}
text=text+'></embed>';}
document.write(text);}
function targetLinks(){if(!document.getElementsByTagName)return;var anchors=document.getElementsByTagName("a");for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.getAttribute("href")&&anchor.getAttribute("rel")=="external"){anchor.target="_blank";}
if(anchor.getAttribute("href")&&anchor.getAttribute("rel")=="internal"){anchor.target="_top";}}}
window.onload=targetLinks;function changeCase(frmObj){var index;var tmpStr;var tmpChar;var preString;var postString;var strlen;tmpStr=frmObj.value.toLowerCase();strLen=tmpStr.length;if(strLen>0){for(index=0;index<strLen;index++){if(index==0){tmpChar=tmpStr.substring(0,1).toUpperCase();postString=tmpStr.substring(1,strLen);tmpStr=tmpChar+postString;}else{tmpChar=tmpStr.substring(index,index+1);if(tmpChar==" "&&index<(strLen-1)){tmpChar=tmpStr.substring(index+1,index+2).toUpperCase();preString=tmpStr.substring(0,index+1);postString=tmpStr.substring(index+2,strLen);tmpStr=preString+tmpChar+postString;}}}}
frmObj.value=tmpStr;}
function changeLower(frmObj){var tmpStr;tmpStr=frmObj.value.toLowerCase();frmObj.value=tmpStr;}
function changeUpper(frmObj){var tmpStr;tmpStr=frmObj.value.toUpperCase();frmObj.value=tmpStr;}
var qs=location.search.substring(1);if(qs.length>1){var ary=location.search.substring(1).substring(1).split("&");for(var i=0,n=ary.length;i<n;i++){var fname=ary[i].split("=")[0];var fvalue=ary[i].split("=")[1];if(fname=="essid"&&fvalue.length>5){document.cookie='sessid='+escape(fvalue)+'; path=/';}}}
function getXHTTP(){var xhttp;try{xhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{xhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e2){try{xhttp=new XMLHttpRequest();}
catch(e3){xhttp=false;}}}
return xhttp;}
function doHttpRequest(url){http.open("GET",url,true);http.onreadystatechange=getHttpRes;http.send(null);}
function getHttpRes(){try{if(http.readyState==4){if(http.status==200){document.getElementById("ot").innerHTML=http.responseText;}else{alert("There was a problem retrieving information requested:\n"+http.statusText);}}}catch(e){alert("Error:"+e.name+"\n"+e.message);}}
var http=getXHTTP();function show(object){if(document.layers&&document.layers[object]){document.layers[object].visibility='visible';}else if(!document.all&&document.getElementById){document.getElementById(object).style.visibility='visible';}else if(document.getElementById){document.getElementById(object).style.visibility='visible';}}
function hide(object){if(document.layers&&document.layers[object]){document.layers[object].visibility='hidden';}else if(!document.all&&document.getElementById){document.getElementById(object).style.visibility='hidden';}else if(document.getElementById){document.getElementById(object).style.visibility='hidden';}}
function loadVideo5(file,h,w,fvars,auto,image) {
	var txt = '';
	txt = txt + '<video width="' + w + '" height="' + h + '" controls="controls"';
	txt = txt;
	if (auto == 'true') {
		txt = txt + ' autoplay="autoplay"';
	}
	if (image != '') {
		txt = txt + ' poster="' + image + '"';
	} 
//	txt = txt + ' preload="auto">\n';
	txt = txt + '>\n';
	if (supports_webm_video()) {
		/* Use WebM Code */
		txt = txt + '<source src="' + file + '.webm" type="video/webm" />\n';
		txt = txt + '</video>\n';
	} else if (supports_h264_baseline_video()) {
		/* Use MP4 Code */
		txt = txt + '<source src="' + file + '.mp4" type="video/mp4" />\n';
		txt = txt + '</video>\n';
	} else if (supports_ogg_theora_video()) {
		/* Use Theora Code */
		txt = txt + '<source src="' + file + '.ogg" type="video/ogg" />\n';
		txt = txt + '</video>\n';
	} else {
		/* Fall back to Flash Code */
		h = h + 24;
		var FLASH = 'https://booking.travelconnxtions.com/images/flash/mediaplayer.swf';
		var nVars = '';
		if (isIE) {
			txt = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
			txt = txt + 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,9,0" ';
			txt = txt + 'width="' + w + '" height="' + h + '">';
			txt = txt + '<param name="movie" value="' + FLASH + '" />';
			txt = txt + '<param name="allowScriptAccess" value="sameDomain" />';
			txt = txt + '<param name="allowfullscreen" value="true" />';
			txt = txt + '<param name="wmode" value="transparent" />';
			txt = txt + '<param name="quality" value="high" />';
			nVars = 'file=' + file + '.flv&';
			if (auto != '') {
				nVars = nVars + 'autostart=' + auto + '&';
			}
			if (image != '') {
				nVars = nVars + 'image=' + image + '&';
			}
			fvars = nVars + fvars;
			if (fvars.length > 0) {
				txt = txt + '<param name="FlashVars" value="' + fvars + '" />';
			}
			txt = txt + '</object>';
		} else {
			txt = '<embed src="' + FLASH + '" ';
			txt = txt + 'quality="high" ';
			txt + txt + 'pluginspage="//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ';
			txt = txt + 'type="application/x-shockwave-flash" ';
			txt = txt + 'width="' + w + '" height="' + h + '" ';
			txt = txt + 'allowscriptaccess="samedomain" ';
			txt = txt + 'allowfullscreen="true" ';
			txt = txt + 'wmode="transparent"';
			nVars = 'file=' + file + '.flv&';
			if (auto != '') {
				nVars = nVars + 'autostart=' + auto + '&';
			}
			if (image != '') {
				nVars = nVars + 'image=' + image + '&';
			}
			fvars = nVars + fvars;
			if (fvars.length > 0) {
				txt	= txt + ' flashvars="' + fvars + '"';
			}		
			txt	= txt + '></embed>';
		}
	}
//	alert(txt);
	document.write(txt);
}
function isMSIEvideo() {
	return !!isIE;
}
function supports_video() {
	return !!document.createElement('video').canPlayType;
}
function supports_h264_baseline_video() {
	if (!supports_video()) { return false; }
	if (isMSIEvideo()) { return false; }
	var v = document.createElement("video");
	return v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
}
function supports_webm_video() {
	if (!supports_video()) { return false; }
	var v = document.createElement("video");
	return v.canPlayType('video/webm; codecs="vp8, vorbis"');
}
function supports_ogg_theora_video() {
	if (!supports_video()) { return false; }
	var v = document.createElement("video");
	return v.canPlayType('video/ogg; codecs="theora, vorbis"');
}
