function OpenWin(strUrl,w,h)
{  //alert(w);
  if (navigator.appName == "Netscape")
      detailwindow = window.open(strUrl,"Detail","toolbar=0,menubar=0,width=" + w + " ,height=" + h + ",scrollbars=1,resizable=1");
  else
      detailwindow = window.open(strUrl,"Detail","toolbar=0, menubar=0, scrollbars=1, resizable=1,width=" + w + ",height=" + h + "");
	detailwindow.focus();
}

function getTodayDate()
{
	var today = new Date();
	document.write('Today is ' + (today.getMonth() + 1) + '/' + today.getDate() + '/' + today.getFullYear());
}

function animateClue(){
	Clue.filters.item(0).Apply();
	Clue.style.visibility="visible";	
	Clue.filters.item(0).Play(6);		
}

function displayCurrentDate()
{
	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 time=new Date();
	var lmonth=months[time.getMonth() + 1];
	var date=time.getDate();
	var year=time.getYear();
	if (year < 2000)
	year = year + 1900;
	//alert("1");
	document.write(lmonth + " ");
	document.write(date + ", " + year);
}

function runSlideShow(){
	// (C) 2000 www.CodeLifter.com
	// http://www.codelifter.com/main/javascript/slideshow2.html
	// Free for all users, but leave in this  header
	// NS4-6,IE4-6
	// Fade effect only in IE; degrades gracefully


	if (document.all){
	   document.images.SlideShow.style.filter="blendTrans(duration=2)"
	   document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
	   document.images.SlideShow.filters.blendTrans.Apply()      
	}
	document.images.SlideShow.src = preLoad[j].src
	if (document.all){
	   document.images.SlideShow.filters.blendTrans.Play()
	}
	j = j + 1
	if (j > (p-1)) j=0
	t = setTimeout('runSlideShow()', slideShowSpeed)
}

function expandingWindow(website) {
	alert(document.body.clientWidth + ' - ' + document.body.clientHeight);
	var heightspeed = 2; // vertical scrolling speed (higher = slower)
	var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
	var leftdist = 0;    // distance to left edge of window
	var topdist = 0;     // distance to top edge of window
	if (document.all) {
		var winwidth = window.screen.availWidth - leftdist;
		var winheight = window.screen.availHeight - topdist;
		var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");
		
		for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
			sizer.resizeTo("1", sizeheight);
		}
	
		for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
			sizer.resizeTo(sizewidth, sizeheight);
		}
		sizer.location = website;
	}
	else
		window.location = website;
}

function DetectImageSize(picName,picTitle)
{
      picURL=picName.src
      //newWindow=window.open(picURL,'newWin','toolbar=no, width='+picName.width +',height='+picName.height)
      newWindow=window.open(picURL,'newWin','toolbar=no, width='+(picName.width + 95)+',height='+(picName.height + 95))
      //newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body background="'+picURL+'"><\/body><\/html>')
      newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body>');
      newWindow.document.write('<table bgcolor="black" border=4 cellspacing=20 cellpadding=10><tr><td align=center><img src="'+picURL+'"></td></tr></table><\/body><\/html>')
      //alert(picName.width + ' - ' + newWindow.document.body.clientWidth);
      //alert(picName.height + ' - ' + newWindow.document.body.clientHeight);
      //newWindow.resizeBy(picName.width-(newWindow.document.body.clientWidth), picName.height- (newWindow.document.body.clientHeight))
      newWindow.focus()
} 




