//=============================================================================
//RANDOM NUMBER GENERATOR - SHARED AMONG FUNCTIONS.
//=============================================================================

function rand()
      {
          var now=new Date()
          var num=(now.getSeconds())%10
          var num=num+1
          document.write("ar0"+num)
      }



//=============================================================================
//GLOBAL VARIABLES - SHARED AMONG FUNCTIONS.
//=============================================================================
function now()
	{

var TDate=new Date()
var TYear=TDate.getYear()
if (TYear < 1000)
TYear+=1900
var TDay=TDate.getDay()
var TMonth=TDate.getMonth()+1
if (TMonth<10)
TMonth="0"+TMonth
var TDayMonth=TDate.getDate()
if (TDayMonth<10)
TDayMonth="0"+TDayMonth
document.write(TMonth+"/"+TDayMonth+"/"+TYear)
	}

// End now -->
//=============================================================================


//=============================================================================
//DISPLAY AGE BASED ON TIME FACTOR
//=============================================================================


/*
Ultimate Age calculator script- By JavaScript Kit (http://www.javascriptkit.com)
Over 200+ free scripts here!
Credit must stay intact for use
*/

var one_day=1000*60*60*24
var one_month=1000*60*60*24*30
var one_year=1000*60*60*24*30*12

function displayage(yr, mon, day, unit, decimal, round){
today=new Date()
var pastdate=new Date(yr, mon-1, day)

var countunit=unit
var decimals=decimal
var rounding=round

finalunit=(countunit=="days")? one_day : (countunit=="months")? one_month : one_year
decimals=(decimals<=0)? 1 : decimals*10

if (unit!="years"){
if (rounding=="rounddown")
document.write(Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals+" "+countunit)
else
document.write(Math.ceil((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals+" "+countunit)
}
else{
yearspast=today.getFullYear()-yr-1
tail=(today.getMonth()>mon-1 || today.getMonth()==mon-1 && today.getDate()>=day)? 1 : 0
pastdate.setFullYear(today.getFullYear())
pastdate2=new Date(today.getFullYear()-1, mon-1, day)
tail=(tail==1)? tail+Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals : Math.floor((today.getTime()-pastdate2.getTime())/(finalunit)*decimals)/decimals
document.write(yearspast+tail+" "+countunit)
}
}

//Sample usage
//displayage (year, month, day, unit, decimals, rounding)
//Unit can be "years", "months", or "days"
//Decimals specifies demical places to round to (ie: 2)
//Rounding can be "roundup" or "rounddown"

//displayage(1997, 11, 24, "years", 0, "rounddown")


//=============================================================================

function now2()

	{
//<SCRIPT LANGUAGE=Javascript>
// Java Script Calendar is a small script for web pages which displays current Day of the week, Month, Date and Year along with Holidays notification. Just like this working demo below. It will work with Netscape 2++, Microsoft 3++ and Opera 3++ web browsers.
//
//                                    Tuesday, November 24, 1998    
//
//About 70 holidays from all over the world are displayed by Calendar (if you know other ones, let me know, I will add them). It even calculates Easter Sunday date! To see how it works change the date on your computer to January, 1,
//for example and re-load the page.
//
//Installation is very simple. Just copy the script below, everything between SCRIPT and SCRIPT tags (including tags themselves) and paste in the place you want it to appear on your page. You can customize the way
// it looks by changing document.write function arguments just after month names definitions. Java Script Calendar is free without any limitations. Copyright © Eugene Vassiltsov. But please, let me know if you will use it.
//
//
 calendar = new Date();
 day = calendar.getDay();
 month = calendar.getMonth();
 date = calendar.getDate();
 year = calendar.getYear();
 if (year < 1000)
 year+=1900
 cent = parseInt(year/100);
 g = year % 19;
 k = parseInt((cent - 17)/25);
 i = (cent - parseInt(cent/4) - parseInt((cent - k)/3) + 19*g + 15) % 30;
 i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1))*parseInt((21-g)/11));
 j = (year + parseInt(year/4) + i + 2 - cent + parseInt(cent/4)) % 7;
 l = i - j;
 emonth = 3 + parseInt((l + 40)/44);
 edate = l + 28 - 31*parseInt((emonth/4));
 emonth--;
 var dayname = 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("<font size=1>");
 document.write(dayname[day] + ", ");
 document.write(monthname[month] + " ");
 if (date< 10) document.write("0" + date + ", ");
         else document.write(date + ", ");
 document.write(year + "    <font color=FF0000><br>");
 // Easter
 if ((month == emonth) && (date == edate)) document.write("Easter Sunday (Western)   ");
 // January
 if ((month == 0) && (date == 1)) document.write("New Year's Day");
 if ((month == 0) && (date == 15)) document.write("Adults Day (Japan)");
 if ((month == 0) && (date == 27)) document.write("Wolfgang Amadeus Mozart born (1756)");
 if ((month == 0) && (day == 1) && (date > 14) && (date< 22)) document.write("Martin Luther King's Birthday");
 // February
 if ((month == 1) && (date == 2)) document.write("Groundhog Day");
 if ((month == 1) && (date == 8)) document.write("Jules Verne born (1828)");
 if ((month == 1) && (date == 11)) document.write("National Foundation Day (Japan)");
 if ((month == 1) && (date== 12)) document.write("Lincoln's Birthday");
 if((month == 1) && (date == 14)) document.write("St. Valentine's Day");
 if ((month == 1) && (date == 15)) document.write("Galileo Galilei born (1564)");
 if ((month == 1) && (date == 22)) document.write("Washington's Birthday");
 if ((month == 1) && (date == 29)) document.write("Leap Day");
 // March
 if ((month == 2) && (date == 3)) document.write("Girl's Day (Japan)");
 if ((month == 2) && (date == 17)) document.write("St. Patrick's Day");
 if ((month == 2) && (date == 21)) document.write("J.S. Bach born (1685)");
 // April
 if ((month == 3) && (date == 1)) document.write("April Fools' Day");
 if ((month == 3) && (date == 8)) document.write("Buddha born");
 if ((month == 3) && (date == 15) && (day != 0)) document.write("Income Tax Day (USA)");
 if ((month == 3) && (date == 16) && (day == 1)) document.write("Income Tax Day (USA)");
 if ((month == 3) && (date == 15)) document.write("Leonardo da Vinci born (1452)");
 if ((month == 3) && (date == 22)) document.write("Earth Day");
 if ((month == 3) && (date == 29)) document.write("Emperor's Birthday (Japan)");
 if ((month == 3) && (day == 0) && (date > 0) && (date< 8)) document.write("Daylight Savings Time Begins");
 // May
 if ((month == 4) && (date == 1)) document.write("May Day,   Boy's Day (Japan)");
 if ((month == 4) && (date == 2)) document.write("Constitution Day (Japan)");
 if ((month == 4) && (date == 5)) document.write("Cinco de Mayo (Mexico),   Children's Day (Japan)");
 if ((month == 4) && (date == 14)) document.write("Independence Day (Paraguay)");
 if ((month == 4) && (day == 0) && (date > 7) && (date< 16)) document.write("Mother's Day");
 if ((month == 4) && (day == 1) && (date > 24)) document.write("Memorial Day");
 // June
 if ((month == 5) && (date == 5)) document.write("Constitution Day (Denmark)");
 if ((month == 5) && (date == 6)) document.write("D-Day (USA)");
 if ((month == 5) && (date == 11)) document.write("Kamehameha (Hawaii)");
 if ((month == 5) && (date == 14)) document.write("FlagDay (USA)");
 if ((month == 5) && (date == 21)) document.write("Summer Solstice");
 if((month == 5) && (date == 24)) document.write("St. Jean Baptiste Day (Canada)");
 if ((month == 5) && (date == 30)) document.write("Independence Day (Zaire)");
 if ((month == 5) && (day == 0) && (date > 15) && (date< 24)) document.write("Father's Day");
 // July
 if ((month == 6) && (date == 1)) document.write("Independence Day (Canada)");
 if ((month == 6) && (date == 4)) document.write("Independence Day (USA)");
 if ((month == 6) && (date == 14)) document.write("Bastille Day (France)");
 // August
 if ((month == 7) && (date == 1)) document.write("Confederation Day (Switzerland)");
 if ((month == 7) && (date == 10)) document.write("Independence Day (Ecuador)");
 if ((month == 7) && (date == 15)) document.write("Independence Day (India)");
 // September
 if ((month == 8) && (date == 7)) document.write("Independence Day (Brazil)");
 if ((month == 8) && (date == 11)) document.write("<img src='../images/flag.bmp' height='20'>  We Will Never Forget!");
 if ((month == 8) && (date == 15)) document.write("Respect for the Aged Day (Japan)");
 if ((month == 8) && (date == 16)) document.write("Independence Day (Mexico)");
 if ((month == 8) && (day== 1)&& (date > 0) && (date< 8)) document.write("Labor Day (USA)");
 // October
 if ((month == 9) && (date == 1)) document.write("German Reunufication (1990)");
 if ((month == 9) && (date == 10)) document.write("Health-Sports Day (Japan)");
 if ((month == 9) && (day == 1) && (date > 7) && (date< 16)) document.write("Columbus Day (USA)");
 if ((month == 9) && (day == 0) && (date > 24) && (date< 31)) document.write("Daylight Savings Time Ends");
 if ((month == 9) && (day == 0) && (date == 31)) document.write("Daylight Savings Time Ends");
 if ((month == 9) && (date == 24)) document.write("United Nations Day");
 if ((month == 9) && (date == 31)) document.write("Halloween");
 // November
 if ((month == 10) && (date == 1)) document.write("All Saints Day");
 if ((month == 10) && (date == 2)) document.write("All Souls Day");
 if ((month == 10) && (date == 3)) document.write("Culture Day (Japan)");
 if ((month == 10) && (date == 11)) document.write("Veteran's Day (USA),    Remembrance Day (Canada)");
 if ((month == 10) && (date ==20)) document.write("Revolution Day (Mexico)");
 if ((month == 10) && (date == 23)) document.write("Labor Thanksgiving Day (Japan)");
 if ((month == 10) && (day == 4) && (date > 23) && (date< 30)) document.write("Happy Thanksgiving (USA)");
 if ((month == 10) && (date == 30) && (day == 4)) document.write("Happy Thanksgiving (USA)");
 // December
 if ((month == 11) && (date == 10)) document.write("Human Rights Day");
 if ((month == 11) && (date == 21)) document.write("Winter Solstice");
 if ((month == 11) && (date == 24)) document.write("Christmas Eve");
 if ((month == 11) && (date == 25)) document.write("Merry Christmas");
 if ((month == 11) && (date == 26)) document.write("Boxing Day");
 if ((month == 11) && (date == 31)) document.write("Happy New Year");
 document.write("</font>");
//-->
 }



//=============================================================================

function rdate()
 {

//Current date script credit: 
//JavaScript Kit (www.javascriptkit.com)
//Over 200+ free scripts here!
///

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
document.write(year+"/"+month+"/"+daym)

}


//=============================================================================
//RANDOM BOOK LIST GENERATOR
//=============================================================================
function randbook()
{
	numquotes = 24;

	var quotes = new Array(numquotes);
	quotes[0]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_kitchen+bath\"></script>";
	quotes[1]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_house+plans\"></script>";
	quotes[2]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_home+design\"></script>";
	quotes[3]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_house+garden\"></script>";
	quotes[4]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_interior%20design\"></script>";
	quotes[5]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_outdoor%20garden\"></script>";
	quotes[6]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_luxury+home\"></script>";
	quotes[7]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_home+improvement\"></script>";
	quotes[8]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_dream+pool\"></script>";
	quotes[9]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_stone%20tile\"></script>";
	quotes[10]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_porches\"></script>";
	quotes[11]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_waterfront%20home\"></script>";
	quotes[12]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_kitchen+design\"></script>";
	quotes[13]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_sculptures\"></script>";
	quotes[14]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_bath+design\"></script>";
	quotes[15]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_spanish-style+homes\"></script>";
	quotes[16]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_unique+homes\"></script>";
	quotes[17]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_loft+ideas\"></script>";
	quotes[18]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_feng+shui\"></script>";
	quotes[19]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_faux+finishes\"></script>";
	quotes[20]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_decorative+paint\"></script>";
	quotes[21]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_shabby+chic\"></script>";
	quotes[22]="<script src=\"http://www.kokogiak.com/amazon/tools/widget09.asp?al_ws=1_Books_Arts/|Photography_solisdesignin-20_0_1_0_75_florida+design\"></script>";
        quotes[23]="Books: <iframe marginwidth=\"0\" marginheight=\"0\" width=\"160\" height=\"600\" scrolling=\"no\" frameborder=\"0\" src=\"http://rcm.amazon.com/e/cm?t=solisdesignin-20&l=st1&search=luxury%20home&mode=books&p=14&o=1&f=ifr\"><MAP NAME=\"boxmap-p14\"><AREA SHAPE=\"RECT\" COORDS=\"37, 588, 126, 600\" HREF=\"http://rcm.amazon.com/e/cm/privacy-policy.html?o=1\" ><AREA COORDS=\"0,0,10000,10000\" HREF=\"http://www.amazon.com/exec/obidos/redirect-home/solisdesignin-20\" ></MAP><img src=\"http://rcm-images.amazon.com/images/G/01/rcm/160x600.gif\" width=\"160\" height=\"600\" border=\"0\" usemap=\"#boxmap-p14\" alt=\"Shop at Amazon.com\"></iframe><br>List by LWH";


	var rand = Math.floor(Math.random()*numquotes);
	document.write(quotes[rand]);
	document.write("C-"+rand+"<br>");
}


//=============================================================================
//WATERMARK THE BACKGROUND IMAGE
//=============================================================================

/*
Watermark Backgound Image Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit dynamicdrive.com
*/
function watermark(image)
{
	if (document.all||document.getElementById)
	document.body.style.background='url(" + image + ") white center no-repeat fixed'
}

//=============================================================================
//COPYRIGHT DATA
//=============================================================================
function copyright()
	{
	
	today=new Date();
    	y0=today.getFullYear();

	document.write("Copyright © 1997-");
 	document.write(y0);
	document.write(" <nobr>Pablo Solis</nobr> - All Rights Reserved. You may not sell, publish, license or otherwise distribute any of the photographs, drawings, designs and concepts found on this site without the written permission of Pablo Solis.");
 
	}

// End copyright -->



//=============================================================================
//BREAKOUT OF FRAMES
//=============================================================================

function breakframe()
	{
	if(top.location.href != self.location.href)
	top.location.href = self.location.href;
	}
//  End -->



//=============================================================================
//FORCE FRAMESET ONTO PAGE
//=============================================================================

function forceFrameSet(url) {

<!-- Begin
	if (parent.location.href == self.location.href) {
		// change the url below to the url of the
		// frameset page...
		window.location.href = url;
	}//  End if -->

}


//=============================================================================
//POPUP A NEW WINDOW
//=============================================================================
function popWin(url)
	{
	var popWin= window.open(url,"windowName",'nostatus,scrollbars=yes,resizable=no,width=420,height=360,top=0,left=0').focus();
	}

// End -->



//=============================================================================
//POPUP A NEW WINDOW - with auto resizing 
//=============================================================================
//Script:     Auto-Sizing Image Popup Window

//Functions:  Use this script to launch a popup window that
//            automatically loads an image and resizes itself
//            to fit neatly around that image. The script also
//            places a title you set in the titlebar of the 
//            popup window. Any number of images can be launched
//            from a single instance of the script.
//            
//Browsers:   NS6-7 & IE4 and later
//            [Degrades functionally in NS4]
//
//Calling the Image Popup from Links in Your Page
//This is the form of the function:
//imagePop("url_of_image","title_of_image")

//Use the relative or absolute path of the image where we show
//url_of_image.  This is the url of the image you wish to show
//in the auto-sizing popup window.

//Use any text you wish where we show title_of_image. This is 
//the title that will appear in the titlebar of the popup. (Note:
//do not use single- or double-quotes within a title.)

//Caution:  Be careful to place both values within quotes.
//See the samples below.

//Author:     etLux
//==============================================================

function popWin2(imageURL, imageTitle){

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 10;
PositionY = 10;

// 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;

	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(100,100);');
	writeln('width=100-(document.body.clientWidth-document.images[0].width);');
	writeln('height=100-(document.body.clientHeight-document.images[0].height)+110;');
	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('<LINK href="http://www.luxurywaterfronthome.com/default.css" rel=StyleSheet type=text/css></head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
	else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
	writeln('<img name="George" src='+imageURL+' style="display:block"></font><font size="1" bgcolor="white" color="#FFFFFF">This image may be subject to copyright.<hr><font size="2" bgcolor="white" color="#FFFFFF"><nobr>Brought to you by:<br></nobr><img src="http://www.luxurywaterfronthome.com/images/bghead1.jpg" valign="top" height="30"><nobr><br>This window will self-close</nobr></font></body></html>');
	close();		
	}
}

//END




//=============================================================================
//LAST MODIFIDED DATA
//=============================================================================
function lastmod()
{
	var months = new Array(13);
	months[1] = "January";
	months[2] = "February";
	months[3] = "March";
	months[4] = "April";
	months[5] = "May";
	months[6] = "June";
	months[7] = "July";
	months[8] = "August";
	months[9] = "September";
	months[10] = "October";
	months[11] = "November";
	months[12] = "December";

	var dateObj = new Date(document.lastModified)
	var lmonth = months[dateObj.getMonth() + 1]
	var fyear = dateObj.getYear()
	var date = dateObj.getDate()
	var lmod = "This page was last updated on: <nobr>" + lmonth + " " + date + ", " + fyear + ".</nobr>"

	document.write(lmod)

}//
// End lastmod -->


//=============================================================================
//MODELESS POPUP WINDOW - (will stay on top until closed)
//=============================================================================

//Modeless window script- By DynamicDrive.com
//for full source code and terms of use
//visit http://www.dynamicdrive.com

function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog(url,"popup","help:0;resizable:1;statusbar=no;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else
eval('window.open(url,"popup","width='+mwidth+'px,top=10,left=10,statusbar=no,height='+mheight+'px,resizable=1,scrollbars=1")')
}

// End Modelesswin -->



//=============================================================================
//CHECK TO SEE IF A NEW LISTING
//=============================================================================

//!-- Original:  Nicolas -->
//!-- Web Site:  http://www.javascript-page.com -->

//!-- This script and many more are available free online at -->
//!-- The JavaScript Source!! http://javascript.internet.com -->

//!-- Remember that the date is a Shown as "New" until date specified
//!-- so therefore the date specified should be a future date.
//!-- Begin
function checknew(date) {
var pic = "../images/new.gif";
expdate = new Date(date);
curdate = new Date();
if (expdate.getTime() > curdate.getTime())
document.write("<img src=" + pic + ">");
}
// End checknew -->



//=============================================================================
//POPUP WINDOW - Basic w/variables
//=============================================================================
// (C) 2001 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header

//var theURL = 'thePopupPage.html';
//var width  = 300;
//var height = 400;


function popWindow(theURL, width, height, scroll) {
var windowProps="top=10,left=10,toolbar=no,menubar=no,resizable=yes,scrollbars="+scroll+",status=no,location=no,width="+width+",height="+height;

newWindow = window.open(theURL,"newWin",windowProps).focus();


}
// End popWindow -->

//=============================================================================
//POPUP WINDOW closer- Basic
//=============================================================================
// (C) 2001 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header

var howLong = 10000;

t = null;
function closeMe(){
t = setTimeout("self.close()",howLong);
}

// End closeMe -->



//=============================================================================
//Glossary Lookup
//=============================================================================


function getGlossary(index)
{

var msg = new Array();
var hdg = new Array();


hdg[1] = "Heading One";
msg[1] = "Glossary Line 1";

hdg[2] = "Heading Two";
msg[2] = "Glossary Line 2";

hdg[3] = "Heading Three";
msg[3] = "Glossary Line 3";

hdg[4] = "Heading Four";
msg[4] = "Glossary Line 4";

hdg[5] = "AutoLayering Functions";
msg[5] = "<b><font size='2' face='Arial'>The Autolayering functions are predefined and use several different modes of operation.<p>AUTO:</b> Autolayered with predefined layer names, color & linetype. (Predefined within system preferences - 'Layer Definition File'. Default File=pstool.dfs)<br><b>ASK: </b>Asks user to pick a layer on which to place the entities. This is because some entities are not layer specific and can be placed on any layer.<br><b><font color='#FF0000'>NF: </font></b>Future enhancements (To be incorporated in the next release)<br><b>N/A: </b>Not applicable since it does not have any layering properties.";

hdg[6] = "Heading Six";
msg[6] = "Glossary Line 6";




	newWindow = window.open("","NewWin","width=450, height=200, scrollbars=yes, resizable=yes");

	newWindow.document.write("<html><head><title>Glossary Lookup</title></head><body><table width='100%'>");
	newWindow.document.write("<td bgcolor='#000000' height='75' valign='bottom'><p>");
	newWindow.document.write("<font face='Verdana, Arial' size='3'></font>");
	newWindow.document.write("<font face='Verdana, Arial' size='6' color='#FFFFFF'>");
	newWindow.document.write("<img src='../images/sdi_logo.gif' ALT='SDI Logo' ALIGN='right' VSPACE='2' HSPACE='5' HEIGHT='40'>");
	newWindow.document.write(hdg[index]);
	newWindow.document.write("</font></td><tr><td>");
	newWindow.document.write(msg[index]);
	newWindow.document.write("</td></tr><tr><td><p align='center'>");
	newWindow.document.write("<br><a href='javascript:self.close()'>Close Window</a>");
	newWindow.document.write("</td></table><p><p></body></html>");

	newWindow.document.close();
	newWindow.focus();

}
//  End -->


// Insert the following line in the HTML. Replace '##' with a msgKey & 'KeyWord' w/actual wording.
// <a href="(alert 'Javascript needs to be active for glossary to work.')"; Onclick="javascript:getGlossary('##'); return false;">KeyWord</a>


//=============================================================================
//PopUp Image with header & footer info
//=============================================================================



function popupImg(img,desc)
{

	newWindow = window.open("","NewWin","width=450, height=575, top=5,left=5 scrollbars=yes, resizable=yes");

	newWindow.document.write("<html><head><title>SDI - Image Lookup</title>");
	newWindow.document.write("<SCRIPT TYPE='text/javascript' SRC='scripts.js' LANGUAGE='JavaScript'></script>");
	newWindow.document.write("</head><body><table width='100%' cellspacing='0'><tr><td align='center' colspan='2'>");
	newWindow.document.write("<font face='Verdana, Arial, sans-serif' size='2'>");
	newWindow.document.write("<img src='");
	newWindow.document.write(img);
	newWindow.document.write("' ALT='");
	newWindow.document.write(desc);
	newWindow.document.write("' align='center' VSPACE='2' HSPACE='5' HEIGHT='375'>");
	newWindow.document.write("</font></td></tr><tr><td bgcolor='#000000' height='45' valign='top'><p>");
	newWindow.document.write("<font face='Verdana, Arial, Sans-serif' size='2'color='#FFFFFF'>");
	newWindow.document.write(desc);
	newWindow.document.write("</font></td><td bgcolor='#000000' height='45' valign='top'>");
	newWindow.document.write("<img src='../images/sdi_logo.gif' ALT='SDI Logo' ALIGN='right' VSPACE='1' HSPACE='1' HEIGHT='40'>");
	newWindow.document.write("</td></tr><tr><td colspan='2' ><font face='Verdana, Arial, sans-serif' size='1' color='#C0C0C0'>");
	newWindow.document.write("<script language='Javascript'>copyright();</script>");
	newWindow.document.write("</font><font face='Verdana, Arial, sans-serif' size='2'color='#FFFFFF'><p align='center'><a href='javascript:self.close()'>Close Window</a>");
	newWindow.document.write("</td></table><p><p></body></html>");

	newWindow.document.close();
	newWindow.focus();
}
//  End -->


// Insert the following line in the HTML. Replace '##' with a valid path to the image file &
// 'DESC" w/an actual description for the image file..
// <a href="##; Onclick="javascript:popupImg('##','DESC'); return false;"></a>

