function enlargeIMG( label, name, w, h, scrolling ) {
  if( label == 'downtown' ) var source = 'enlargeDowntownMap.asp';
  else if( label == 'airport' ) var source = 'enlargeAirportMap.asp';
  else if( label == 'QQEO_11th' ) var source = 'enlargeQQEO11thfloorPlan.asp';
  else if( label == 'QQEO_12th' ) var source = 'enlargeQQEO12thfloorPlan.asp';
  else if( label == 'AEO_1st' ) var source = 'enlargeAEO1stfloorPlan.asp';
  else if( label == 'AEO_2nd' ) var source = 'enlargeAEO2ndfloorPlan.asp';
  else if( label == 'QQEOroomSpec' ) var source = 'enlargeQQEOroomSpec.asp';
  else if( label == 'AEOroomSpec' ) var source = 'enlargeAEOroomSpec.asp';
  else if( label == 'prRel_nov152008' ) var source = 'pressRelease_nov152008.asp';
  else if( label == 'prRel_sep152008' ) var source = 'http://www.rostiegroup.com/ClientLobbyVideo/DDV.ppsx';
  else if( label == 'prRel_may302008' ) var source = 'pressRelease_may302008.asp';
  else if( label == 'prRel_may2008' ) var source = 'pressRelease_may2008.asp';
  else if( label == 'prRel_mar2008' ) var source = 'pressRelease_mar2008.asp';
  else if( label == 'prRel_jan2007' ) var source = 'pressRelease_jan2007.asp';
  else if( label == 'prRel_jun2006' ) var source = 'pressRelease_jun2006.asp';  
  else if( label == 'prRel_jun2006b' ) var source = 'pressRelease_jun2006b.asp'; 
  else if( label == 'prRel_feb2005' ) var source = 'pressRelease_feb2005.asp'; 
  else if( label == 'prRel_mar2004' ) var source = 'pressRelease_mar2004.asp';    
  else if( label == 'prRel_sep2003a' ) var source = 'pressRelease_sep2003a.asp';    
  else if( label == 'prRel_sep2003b' ) var source = 'pressRelease_sep2003b.asp'; 
  else if( label == 'prRel_mar2007pdf' ) var source = 'RGNP030507.pdf';
  else if( label == 'Rostiegroup_video' ) var source = 'C:\Documents and Settings\Jacky\My Documents\Old OS files\Web Picture\Rostie Group\Small Image Gallery\rostiegroup_vid.html';
  else if( label == 'prRel_feb2007cp24' ) var source = 'pressRelease_feb2007cp24.asp';
  else if( label == 'prRel_mar2007cp24' ) var source = 'pressRelease_mar2007cp24.asp';
  else if( label == 'prRel_nov2007cbc' ) var source = 'pressRelease_nov2007cbc.asp';
  else if( label == 'prRel_dec2007cp24' ) var source = 'pressRelease_dec2007cp24.asp';
  else if( label == 'about_RostieGroup' ) var source = 'about_RostieGroup.asp';
  else if( label == 'prRel_may2007hd' ) var source = 'RTRHDMay2007.pdf';
  else if( label == 'prRel_may2007twj' ) var source ='http://online.wsj.com/article_email/article_print/SB117769892695285074-lMyQjAxMDE3NzM3MDYzOTA4Wj.html';
  else if( label == 'floorPlanPopUp' ) var source = 'contactRoomRequest_floorPlan.asp';   
  else if( label == 'qqeo' ) var source = 'qqeoDirections.asp';   
  else if( label == 'aeo' ) var source = 'aeoDirections.asp';
  else if( label == 'vt' ) var source = 'vt/virtualTour.asp';
	
  win = window.open( source, name, 'width=' + w + ', height=' + h + ', screenX=0, screenY=0, left=25, top=25, status=no, menubar=no, location=no, scrollbars=' + scrolling + ', directories=no, resizable=no' );
  win.focus();  
}


function hideLayer( layerName ) {
  document.getElementById( layerName ).style.display = "none";
}
function showLayer( layerName ) {
  document.getElementById( layerName ).style.display = "block";
}


function zoom( cmd ) {
  if( cmd == "in" ) {
    document.getElementById( "zoomOutLink" ).style.display = "block";	
    document.getElementById( "zoomInLink" ).style.display = "none"; 
    document.getElementById( "zoomOut" ).style.display = "none";	
    document.getElementById( "zoomIn" ).style.display = "block";   
  } else if( cmd == "out") {
    document.getElementById( "zoomOutLink" ).style.display = "none";	
    document.getElementById( "zoomInLink" ).style.display = "block"; 
    document.getElementById( "zoomOut" ).style.display = "block";	
    document.getElementById( "zoomIn" ).style.display = "none";   	  
  }
}


function selectFloorPlan() {  //this function is called from aboutFloorPlan.asp
  var selection = document.roomRequest.roomName;
  var selectedRoom = selection.selectedIndex; 
  var selectedRoomName = selection.options[ selectedRoom ].value;
  
  var layerList = new Array( "QQEO", "AEO", "atlantic", "baltic", "bering", "caspian", "erie", "huron", "lake", "michigan", "muskoka", "ontario", "pacific", "rainyLake", "superior", "apollo", "galaxy", "jupiter", "mercury", "satellite", "satelliteI", "satelliteII", "saturn" );

  if( selectedRoomName != "" ) {
	for( i=0; i<layerList.length; i++ ) {
      var layerName = layerList[ i ];
	  document.getElementById( layerName ).style.display = "none";	
    }
    document.getElementById( selectedRoomName ).style.display = "block";	
  }
}

function selectFloorPlanB() {  //this function is called from contactRoomRequest.asp
  var selection = document.roomList.roomName;
  var selectedRoom = selection.selectedIndex; 
  var selectedRoomName = selection.options[ selectedRoom ].value;
  
  var layerList = new Array( "atlantic", "baltic", "bering", "caspian", "erie", "huron", "lake", "michigan", "muskoka", "ontario", "pacific", "rainyLake", "superior", "apollo", "galaxy", "jupiter", "mercury", "satellite", "satelliteI", "satelliteII", "saturn" );

  if( selectedRoomName != "" ) {
	for( i=0; i<layerList.length; i++ ) {
      var layerName = layerList[ i ];
	  document.getElementById( layerName ).style.display = "none";	
    }
    document.getElementById( selectedRoomName ).style.display = "block";	
  }
}

function enlargeGalleryPic( no ) {  
  script = '<html><head><title>The Rostie Group</title><link href="styleSheet.css" rel="stylesheet" type="text/css" /></head><body class="bodyB" style="text-align:center; background-color:#000000;">' + 
             '<img src="galleryPics/' + no + '.jpg" style="border-width:0px; height:250px;" />' +
           '</body></html>' ;
	    
  win = window.open( 'enlargeGalleryPic.asp', 'gallery', 'width=770, height=250, screenX=0, screenY=0, left=25, top=25, status=no, menubar=no, location=no, scrollbars=no, directories=no, resizable=no' );
  win.document.write( script );
  win.document.close();
  win.focus();
  win = null;  
}
function enlargefloorplan( no ) {  
  script = '<html><head><title>The Rostie Group</title><link href="styleSheet.css" rel="stylesheet" type="text/css" /></head><body class="bodyB" style="text-align:center; background-color:#FFFFFF;">' + 
             '<img src="floorplan/' + no + '.jpg" style="border-width:0px; height:452px;" />' +
           '</body></html>' ;
	    
  win = window.open( 'enlargefloorplan.asp', 'gallery', 'width=400, height=452, screenX=0, screenY=0, left=25, top=25, status=no, menubar=no, location=no, scrollbars=no, directories=no, resizable=no' );
  win.document.write( script );
  win.document.close();
  win.focus();
  win = null;  
}
//-------------------------------------------------------------Div------------------------------------------------------------------//

//-------------------------------------------------------------Modal-----------------------------------------------------------------//
function OnModalWindowClick()
{
	$('modalWindow').style.display = $('modalBackground').style.display = 'none';
	
	// special IE-only processing for windowed elements, like select		
	
	if (window.detachEvent)
		window.detachEvent('onresize', OnWindowResize_Modal);
	else if (window.removeEventListener)
		window.removeEventListener('resize', OnWindowResize_Modal, false);
	else
		window.onresize = null;
}
function OnWindowResize_Modal()
{
	// we only need to move the dialog based on scroll position if
	//   we're using a browser that doesn't support position: fixed, like < IE 7
	var left = window.XMLHttpRequest == null ? document.documentElement.scrollLeft : 0;
	var top = window.XMLHttpRequest == null ? document.documentElement.scrollTop : 0;
	var div = $('modalWindow');
	
	div.style.left = Math.max((left + (GetWindowWidth() - div.offsetWidth) / 2), 0) + 'px';
	div.style.top = Math.max((top + (GetWindowHeight() - div.offsetHeight) / 2), 0) + 'px';
}		 
/* These functions deal with IE's retardedness in not allowing divs to 
 * cover select elements by replacing the select elements with spans. */
 
function RemoveSelectSpans()
{
	var selects = document.getElementsByTagName('select');
	
	for (var i = 0; i < selects.length; i++)
	{
		var select = selects[i];
		
		if (select.clientWidth == 0 || select.clientHeight == 0 || 
			select.nextSibling == null || select.nextSibling.className != 'selectReplacement')
		{
			continue;
		}
			
		select.parentNode.removeChild(select.nextSibling);
		select.style.display = select.cachedDisplay;
	}
}
 
function ReplaceSelectsWithSpans()
{
	var selects = document.getElementsByTagName('select');
	
	for (var i = 0; i < selects.length; i++)
	{
		var select = selects[i];
		
		if (select.clientWidth == 0 || select.clientHeight == 0 || 
			select.nextSibling == null || select.nextSibling.className == 'selectReplacement')
		{
			continue;
		}
			
		var span = document.createElement('span');
		
		// this would be "- 3", but for that appears to shift the block that contains the span 
		//   one pixel down; instead we tolerate the span being 1px shorter than the select
		span.style.height = (select.clientHeight - 4) + 'px';
		span.style.width = (select.clientWidth - 6) + 'px';
		span.style.display = 'inline-block';
		span.style.border = '1px solid rgb(200, 210, 230)';
		span.style.padding = '1px 0 0 4px';
		span.style.fontFamily = 'Arial';
		span.style.fontSize = 'smaller';
		span.style.position = 'relative';
		span.style.top = '1px';
		span.className = 'selectReplacement';
		
		span.innerHTML = select.options[select.selectedIndex].innerHTML + 
			'<img src="custom_drop.gif" alt="drop down" style="position: absolute; right: 1px; top: 1px;" />';
		
		select.cachedDisplay = select.style.display;
		select.style.display = 'none';
		select.parentNode.insertBefore(span, select.nextSibling);
	}
}
 
/* The following two functions are not used, but have been kept here because 
 *   they might be useful; one must use this method to programmatically add
 *   javascript-valued CSS values (using element.style.div = expresssion(...)
 *   does not work).  These are only useful for IE.
 */
 
function AddStyleRules()
{
	if (_rulesAdded)
		return;
		
	_rulesAdded = true;
 
	var stylesheet = document.styleSheets[document.styleSheets.length - 1];
	
	if (!document.all)
	{
		InsertCssRule(stylesheet, '#modalBackground', 'position: fixed; height: 100%; width: 100%; left: 0; top: 0;');		
		InsertCssRule(stylesheet, '#modalWindow', 'position: fixed; left: 0; top: 0;');	
		InsertCssRule(stylesheet, '#link1', 'position: fixed; left: 0; top: 0;');	
	}
	else
	{
		InsertCssRule(stylesheet, '#modalBackground', 
			'position: absolute; ' +
			'left: expression(ignoreMe = document.documentElement.scrollLeft + "px"); ' +
			'top: expression(ignoreMe = document.documentElement.scrollTop + "px");' +
			'width: expression(document.documentElement.clientWidth + "px"); ' +
			'height: expression(document.documentElement.clientHeight + "px");');
 
		InsertCssRule(stylesheet, '#modalWindow', 
			'position: absolute; ' +
			'left: expression(ignoreMe = document.documentElement.scrollLeft + "px"); ' +
			'top: expression(ignoreMe = document.documentElement.scrollTop + "px");');
			
		InsertCssRule(stylesheet, '#link1', 
			'position: absolute; ' +
			'left: expression(ignoreMe = document.documentElement.scrollLeft + "px"); ' +
			'top: expression(ignoreMe = document.documentElement.scrollTop + "px");');
 
	}
}
 
function InsertCssRule(stylesheet, selector, rule)
{
	if (stylesheet.addRule)
	{
		stylesheet.addRule(selector, rule, stylesheet.rules.length);
		return stylesheet.rules.length - 1;
	}
	else
	{
		stylesheet.insertRule(selector + ' {' + rule + '}', stylesheet.cssRules.length);
		return stylesheet.cssRules.length - 1;
	}
}
function OnDocumentDblClick()
{
	$('modalWindow').style.display = $('modalBackground').style.display = 'block';
 
	// special < IE7 -only processing for windowed elements, like select	
	if (window.XMLHttpRequest == null)
	{
		var type = $('hideType').value;
		
		if (type == 'iframe')
			$('modalIframe').style.display = 'block';
		if (type == 'replace')
			ReplaceSelectsWithSpans();
	}
 
	// call once to center everything
	OnWindowResize_Modal();
	
	if (window.attachEvent)
		window.attachEvent('onresize', OnWindowResize_Modal);
	else if (window.addEventListener)
		window.addEventListener('resize', OnWindowResize_Modal, false);
	else
		window.onresize = OnWindowResize_Modal;
	
	// we won't bother with using javascript in CSS to take care
	//   keeping the window centered
	if (document.all)
		document.documentElement.onscroll = OnWindowResize_Modal;
}		
				 
function GetWindowHeight()
{
	var height =
		document.documentElement && document.documentElement.clientHeight ||
		document.body && document.body.clientHeight ||
		document.body && document.body.parentNode && document.body.parentNode.clientHeight ||
		0;
		
	return height;
}
// ----------------------------------------------------Shared Function---------------------------------------------------------//
function $(id)
{
	return document.getElementById(id);
}
function GetWindowWidth()
{
	var width =
		document.documentElement && document.documentElement.clientWidth ||
		document.body && document.body.clientWidth ||
		document.body && document.body.parentNode && document.body.parentNode.clientWidth ||
		0;
		
	return width;
}
//--------------------------------------------------------------Side Menu--------------------------------------------------------//
function toggleDiv2(id1,num) 
{
	var i = 0;
	for(i = 1; i <= num; i++)
	{ 						
		if (id1=="link" + i)
		{
			if (document.layers)
			{
				document.layers('menu' + i + '').style.background="#FFFFFF";
			}
			else if (document.all) 
			{
				document.all('menu' + i + '').style.background="#FFFFFF";
			}
			else if (document.getElementById)
			{
				document.getElementById('menu' + i + '').style.background="#FFFFFF";
			}
		}
		else if (id1!="link" + i)
		{
			if (document.layers)
			{
				document.layers('menu' + i + '').style.background="#ddeaf0";
			}
			else if (document.all)
			{
				document.all('menu' + i + '').style.background="#ddeaf0";
			}
			else if (document.getElementById)
			{
				document.getElementById('menu' + i + '').style.background = "#ddeaf0";
			}
		}
	}			
}

function toggleDiv(id1,num) 
{
	var i = 0;
	for(i = 1; i <= num; i++)
	{ 						
		if (id1=="link" + i)
		{
			if (document.layers)
			{
				document.layers('link' + i + '').visibility = "show";
				document.layers('menu' + i + '').style.background="#FFFFFF";
			}
			else if (document.all) 
			{
				document.all('link' + i + '').style.visibility = "visible";
				document.all('menu' + i + '').style.background="#FFFFFF";
			}
			else if (document.getElementById)
			{
				document.getElementById('link' + i + '').style.visibility = "visible";
				document.getElementById('menu' + i + '').style.background="#FFFFFF";
			}
		}
		else if (id1!="link" + i)
		{
			if (document.layers)
			{
				document.layers('link' + i + '').visibility = "hide";
				document.layers('menu' + i + '').style.background="#ddeaf0";
			}
			else if (document.all)
			{
				document.all('link' + i + '').style.visibility = "hidden";
				document.all('menu' + i + '').style.background="#ddeaf0";
			}
			else if (document.getElementById)
			{
				document.getElementById('link' + i + '').style.visibility = "hidden";
				document.getElementById('menu' + i + '').style.background = "#ddeaf0";
			}
		}
	}			
}
		
function toggleGallery(id1,num) 
{
	var i = 0;
	for(i = 1; i <= num; i++)
	{ 
		if (id1=="Gallery" + i)
		{
			if (document.layers)
			{
				document.layers('Gallery'+i+'').visibility = "show";
			}
			else if (document.all) 
			{
				document.all('Gallery'+i+'').style.visibility = "visible";
			}
			else if (document.getElementById)
			{
				document.getElementById('Gallery'+i+'').style.visibility = "visible";
			}
		}
		else if (id1!="Gallery" + i)
		{
			if (document.layers)
			{
				document.layers('Gallery'+i+'').visibility = "hide";
			}
			else if (document.all)
			{
				document.all('Gallery'+i+'').style.visibility = "hidden";
		
			}
			else if (document.getElementById)
			{
				document.getElementById('Gallery'+i+'').style.visibility = "hidden";
	
			}
		}
	}			
}