// JavaScript Document

function date() {
	var d=new Date()
	var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
	var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
	document.write(monthname[d.getMonth()] + " ")
	document.write(d.getDate() + ", ")
	document.write(d.getFullYear())
}

function go_to_station(){
	//create a new variable, put rentalnum.value into it
	var rental = document.rentsearch.rentalnum.value
	
	//Compare values with the '==' operator and redirect
	if  ((rental == "l7") || (rental == "L7")) {
		window.location.href = "http://www.rentvu.com/listings/L7.htm";}		
	else if ((rental == "m2") || (rental == "M2")) {
		window.location.href = "http://www.rentvu.com/listings/M2.htm";}
	else if ((rental == "c3") || (rental == "C3")) {
		window.location.href = "http://www.rentvu.com/listings/C3.htm";}
	else if ((rental == "7A") || (rental == "7a")) {
		window.location.href = "http://www.rentvu.com/listings/7A.htm";}
	else if ((rental == "L9") || (rental == "l9")) {
		window.location.href = "http://www.rentvu.com/listings/L9.htm";}
	else if ((rental == "C4") || (rental == "c4")) {
		window.location.href = "http://www.rentvu.com/listings/C4.htm";}
	else if ((rental == "L9") || (rental == "l9")) {
		window.location.href = "http://www.rentvu.com/listings/L9.htm";}
	else if ((rental == "1A") || (rental == "1a")) {
		window.location.href = "http://www.rentvu.com/listings/1A.htm";}
	else if ((rental == "1S") || (rental == "1s")) {
		window.location.href = "http://www.rentvu.com/listings/1S.htm";}
	else if ((rental == "2A") || (rental == "2a")) {
		window.location.href = "http://www.rentvu.com/listings/2A.htm";}
	else if ((rental == "5S") || (rental == "5s")) {
		window.location.href = "http://www.rentvu.com/listings/5S.htm";}
	else if ((rental == "3L") || (rental == "3l")) {
		window.location.href = "http://www.rentvu.com/listings/3L.htm";}
	else if ((rental == "1W") || (rental == "1w")) {
		window.location.href = "http://www.rentvu.com/listings/1W.htm";}
	else if ((rental == "4D") || (rental == "4d")) {
		window.location.href = "http://www.rentvu.com/listings/4D.htm";}
	else if ((rental == "c2") || (rental == "C2")) {
		window.location.href = "http://www.rentvu.com/listings/C2.htm";}	
	else if ((rental == "b2") || (rental == "B2")) {
		window.location.href = "http://www.rentvu.com/listings/B2.htm";}			
	else if ((rental == "9a") || (rental == "9A")) {
		window.location.href = "http://www.rentvu.com/listings/9A.htm";}
	else if ((rental == "7b") || (rental == "7B")) {
		window.location.href = "http://www.rentvu.com/listings/7B.htm";}
	else if ((rental == "l2") || (rental == "L2")) {
		window.location.href = "http://www.rentvu.com/listings/L2.htm";}
	else if ((rental == "MA") || (rental == "Ma") || (rental == "mA") || (rental == "ma")) {
		window.location.href = "http://www.rentvu.com/listings/MA.htm";}
	else if ((rental == "AA") || (rental == "aA") || (rental == "Aa") || (rental == "aa")) {
		window.location.href = "http://www.rentvu.com/listings/AA.htm";}
	else if ((rental == "l5") || (rental == "L5")) {
		window.location.href = "http://www.rentvu.com/listings/L5.htm";}		
	else if ((rental == "e6") || (rental == "E6")) {
		window.location.href = "http://www.rentvu.com/listings/E6.htm";}
	else if ((rental == "z1") || (rental == "Z1")) {
		window.location.href = "http://www.rentvu.com/listings/Z1.htm";}	
	else if ((rental == "z2") || (rental == "Z2")) {
		window.location.href = "http://www.rentvu.com/listings/Z2.htm";}
	else if ((rental == "z3") || (rental == "Z3")) {
		window.location.href = "http://www.rentvu.com/listings/Z3.htm";}					
	else if ((rental == "w6") || (rental == "W6")) {
		window.location.href = "http://www.rentvu.com/listings/W6.htm";}
	else if ((rental == "s5") || (rental == "S5")) {
		window.location.href = "http://www.rentvu.com/listings/S5.htm";}
	else if ((rental == "c2") || (rental == "C2")) {
		window.location.href = "http://www.rentvu.com/listings/C2.htm";}
else document.write("Rental does not exist.");
}

// Open Centered Popup Window Script-
function OpenbrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

// Auto-Sizing Image Popup Window

// Set the horizontal and vertical position for the popup
PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
	if (isNN){
		imgWin=window.open('about:blank','',optNN);
	}
	if (isIE){
		imgWin=window.open('about:blank','',optIE);
	}
	with (imgWin.document){
		writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
		writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');
		writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');
		writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');
		writeln('if (isIE){');
		writeln('window.resizeTo(300,300);');
		writeln('width=300-(document.body.clientWidth-document.images[0].width);');
		writeln('height=300-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,height);}');
		writeln('if (isNN){');       
		writeln('window.innerWidth=document.images["George"].width;');
		writeln('window.innerHeight=document.images["George"].height;}}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</sc'+'ript>');
		if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onclick="self.close()">')
		else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()" onclick="self.close()">');
		writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
		close();		
	}
}
