﻿

function NewWindowLogin(mypage, myname, x, y) {
var winl = (screen.width - x) / 2;
var wint = (screen.height - y) / 2;
winprops = 'height='+y+',width='+x+',top='+wint+',left='+winl
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function NewWindow(mypage, myname, x, y) {
var winl = (screen.width - x) / 2;
var wint = (screen.height - y) / 2;
winprops = 'height='+y+',width='+x+',top='+wint+',left='+winl+',scrollbars=yes,resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

 
 function CreateBookmarkLink() {
 // Issue ID 670 - Modified the Title of the Bookmark to be TravelAge West
    title = "Meetings & Conventions"; 
    url = window.location.href;
 
    if ( typeof( window.sidebar ) != "undefined" ) { // could be Mozilla Firefox
                  if( typeof( window.sidebar.addPanel ) != "undefined" ) { // yes - Mozilla Firefox
                        window.sidebar.addPanel( title, url, "" );
                  }
                  else if( window.external ) { // nope -- it's IE after all
                        window.external.AddFavorite( url, title );
                  }
            }
    else if(window.opera && window.print) { // Opera Hotlist
        return true; }
 }

 
function loadNewContent(dest,page) 
{
  var destURL = "photo.aspx?id=" + dest
  try 
  { // Moz supports XMLHttpRequest. IE uses ActiveX.  
    // browser detction is bad. object detection works for any browser
	xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
  }
  catch (e) 
  { 
    // browser doesn't support ajax. handle however you want
	document.location.href = destURL
  }
	
  // the xmlhttp object triggers an event everytime the status changes  
  // triggered() function handles the events
  xmlhttp.onreadystatechange = triggered;
	
  // open takes in the HTTP method and url.
  xmlhttp.open("GET", destURL);
	
  // send the request. if this is a POST request we would have  
  // sent post variables: send("name=aleem&gender=male)  
  // Moz is fine with just send(); but  
  // IE expects a value here, hence we do send(null);
  xmlhttp.send(null);
}

function triggered() 
{ // if the readyState code is 4 (Completed)  
  // and http status is 200 (OK) we go ahead and get the responseText  
  // other readyState codes:  
  // 0=Uninitialised 1=Loading 2=Loaded 3=Interactive
  if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) 
	{
		// xmlhttp.responseText object contains the response.
		document.getElementById("featurestory").innerHTML = xmlhttp.responseText;
		//document.getElementById("gallery").innerHTML = "ghere";

	}
}


