/*--------------------------------------------------------------------------
 *
 *  JavaScript Functions
 *
/*--------------------------------------------------------------------------*/




/*
<div id="flashcontent1">insert content for non flash users</div>
<script type="text/javascript">
   var so = new SWFObject("folder/flashfile.swf", "flash1", "468", "60", "8");
   so.addParam("wmode", "transparent");
   so.write("flashcontent1");
</script>

*/

// oceanhotels "UA-2855585-1"
var gs_google_analytics 		= "UA-2855585-1";
var SWF_EXPRESSINSTALL_URL 		= "/_img/flash/expressInstall.swf";
var SWF_FLASH_VARS_PHOTOSTACK	= {filename: "gallery.xml"};
var SWF_PARAMS					= { wmode: "transparent",
				  					menu: "false"};
				  
				  
function writeE(sUser,sDomain) {
	if(sDomain==undefined){sDomain='oceanhotels'};
	e =(sUser + '@' + sDomain + '.com.au');
	document.write('<a href="mailto:' + e + '">' + e + '</a>');
}
/*
function insertFlash(sFlashUrl, sDiv, sWidth, sHeight, sFlashVars, sFlashParams, nSWFVersion){
	if(nSWFVersion==2){
		swfobject.embedSWF(sFlashUrl, sDiv, sWidth, sHeight, "8", SWF_EXPRESSINSTALL_URL, sFlashVars, swfParams);    
	} else {
		var so = new SWFObject(sFlashUrl, sDiv, sWidth, sHeight, "8");
		so.addParam("wmode", "transparent");
		so.write(sDiv);	
	}
		
}
*/

function openWindow(sURL,sWindowName,w,h) {
	openPhoto(sURL,sWindowName,w,h);
}
function openPhoto(sURL,sWindowName,w,h) {
	oWin = window.open(sURL, sWindowName, 'toolbar=0, location=0, directories=0, status=0, menubar=no, scrollbars=yes, resizable=yes, width='+w+', height='+h);
	oWin.focus();
}

window.addEvent('domready', function(){
	// hide applet
	var s = $('scroller_holder');
	var m = $('left');
	if( ($chk(s)) && ($chk(m)) ){
		var menus = $$('div.menu');
		
		menus.each(function(element, i){
			element.addEvent('mouseover', function(){s.setStyle('visibility', 'hidden');});
			element.addEvent('mouseout', function(){s.setStyle('visibility', 'visible');});
		});
		
	}


	var anchors = $$('a');
	anchors.each(function(element, i){
		if(element.get('rel') && element.get('href')){
			if(element.get('rel').contains('external')) element.target = "_blank";
		}
	});

});



