
var existingMarkers = new Array();
var currentGGLMarkers = new Array();

function hideElement(elementId){
	if(document.getElementById(elementId)){
		document.getElementById(elementId).style.display = 'none';
	}
}

function showElement(elementId){
	if(document.getElementById(elementId)){
		document.getElementById(elementId).style.display = '';
	}
}

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height){
  if(popUpWin) popUpWin.focus();
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function loadCorrectSizedSWF(){
	currHeight = document.getElementById('pageContentContainer').offsetHeight;
	width = 358;
	//alert(currHeight);
	if(currHeight<440){
		height = 240;
		swfPhotos = 'sp1_358x240.swf';
	}
	else if(currHeight<700){
		height = 440;
		swfPhotos = 'sp2_358x390.swf';
	}
	else if(currHeight<1000){
		height = 650;
		swfPhotos = 'sp3_358x600.swf';
	}
	else if(currHeight>=1000){
		height = 690;
		swfPhotos = 'sp4_358x690.swf';
	}
	
	swfCode = '<object type="application/x-shockwave-flash" data="/f/' + swfPhotos + '" id="photoSwf" width="'+width+'" height="'+height+'">';
	swfCode = swfCode+'<param name="movie" value="/f/' + swfPhotos + '" />';
	swfCode = swfCode+'<param name="quality" value="high" />';
	swfCode = swfCode+'<param name="wmode" value="transparent" />';
	swfCode = swfCode+'</object>';
	document.getElementById('sidePhotosContainer').innerHTML = swfCode;
}