//\//////////////////////////////////////////////////////////////////////////////////
//\
//\    windlib.js     enhancements 
//
//    last updated:  Wed December 25 2002 04 :13: PM 
//
//  paste the following two lines in the BODY section of your document, near the very top
//<div id="windDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
//<script language="JavaScript" src="/images/windlib.js"></script>


// Decide browser version
var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
var ie4 = (document.all)? true:false;
var ie5 = false;
var ie6 = false;
var op = navigator.userAgent.indexOf("Opera");

// Microsoft Stupidity Check(tm).
if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')  > 0) {
		ie5 = true;
	}
	if (navigator.userAgent.indexOf('MSIE 6') > 0) {
		ie6 = true;
	}
	if (ns6) {
		ns6 = false;
	}
}

var  scroll = "";
var  resize = "";
var  toolbars = "";
var  pageurl = "";
var  t = 0;
var  l = 0;
var  w = 0;
var  h = 0;
var  timeout = 0;
var  slidespeed = 8;

var  message = "Watch this area for information";
var  init_message = "Watch this area for information";
var  character = 0;
var  to_print = "";
var  ypos = 300;
var  next = 0 ;
var  fade = 100 ;
var  next_message = new Array() ;

///   raises and bumps the next letter, like a stadium wave
var wavemessage = "Wave Message here";

//no need to edit below this line
var mes=new Array();
	mes[0]=-1;
	mes[1]=-4;
	mes[2]=-7;
	mes[3]=-10;
	mes[4]=-7;
	mes[5]=-4;
	mes[6]=-1;
var num=0;
var num2=0;
var txt="";

////////////////////////////////////////////////////////////////////////////////////
// PUBLIC FUNCTIONS
/////////////////////////////////////////////////////////////////////////////

function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function currentOpac(id, opacEnd, millisec) {
	//standard opacity is 100
	var currentOpac = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}

	//call for the function that changes the opacity
	opacity(id, currentOpac, opacEnd, millisec)
}

function hideAlert(){ 
//	shiftOpacity('shadowBox', 500);
//	shiftOpacity('alertLayer', 500);
//	opacity('shadowBox', 100, 00, 500);
//	opacity('alertLayer', 100, 00, 500);
//	opacity('alertBox', 100, 0, 500);
//	opacity('alertShadow', 100, 0, 500);
//opacity('alertnotice', 100, 0, 500);
opacity('div1', 100, 0, 500);
	alertBox.visibility = "hidden"; 
	alertShadow.visibility = "hidden";
 }

	/////   bordercolors for makeAlert
var alertBoxwarn = '#228B22';					/*  forestgreen  */
var alertBoxerror = '#FF0000';					/*  red  */
var alertBoxinfo = '#0000FF';					/*  blue  */
var alertBoxquestion = '#008000';			/*  green  */
var soundString = "";

function makeAlert(aTitle,aMessage,aType,aOK,aSound){

///
////    the image files location needs to be defined 
////        either images/alert????      or /forum/files/alert????   etc. 
imageslocation = "/images/alert";
alertShadow.backgroundColor = eval("alertBox" + aType);
alertShadow.borderColor = eval("alertBox" + aType);
alertBox.borderColor = eval("alertBox" + aType);

if (aSound) {
	//	soundString = "<EMBED SRC=" + aSound + " autostart=true hidden=true volume=100 loop=false>";
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		soundString = "<bgsound src=" + aSound + " loop=1>";
	} else {
		soundString = "<embed src=" + aSound + " autostart=true hidden=true volume=100 loop=false>";
	}
}  else {soundString = ""; }

document.all.alertLayer.innerHTML = "<div id='alertnotice'  style='width: 300px;' ><table border=0 width=100% height=100% >" +
"<tr height=6><td colspan=4 class=alertTitle id=Title" + aType +
">&nbsp;&nbsp; " + aTitle + " </td></tr>" + soundString + "<tr height=5><td width=5></td></tr>" + 
"<tr><td width=5></td><td width=39 align=left><img src=\"" +
imageslocation + aType +
".gif\"></td><td align=center class=alertMessage id=Message" + aType +
">" + aMessage +
"<BR></td><td width=5></td></tr><tr height=5><td width=5></td></tr>" +
"<tr><td width=5></td><td colspan=2 align=center><input class=colorButton" +
" type=button value='" + aOK +
"' onClick='hideAlert()' ><br></td><td width=5></td></tr>" +
"<tr height=5><td width=5></td></tr></table></div>";
thisText = aMessage.length;
if (aTitle.length > aMessage.length){ thisText = aTitle.length; }

			/*  produces a window approximately a quarter size of available window size */
aWidth = (((window.screen.availWidth )/14) * 8);
aHeight = (((window.screen.availHeight )/22) * 6);

alertShadow.width = aWidth;
alertShadow.height = aHeight;
alertBox.width = aWidth;
alertBox.height = aHeight;

			//// try to  position alert notice in center of current window,
if ( (ns4) || (ns6) ) {
	alertShadow.left = ( (window.innerWidth  - aWidth)/2);
	alertShadow.top = (document.scrollTop + (window.innerHeight  - aHeight)/2);
	alertBox.left = ( (window.innerWidth  - aWidth)/2) - 5;
	alertBox.top = (document.scrollTop + (window.innerHeight  - aHeight)/2) - 5;
} else {	
	alertShadow.left = ( (document.body.clientWidth - aWidth)/2);
	alertShadow.top = ( document.body.scrollTop + (document.body.clientHeight  - aHeight)/2);
	alertBox.left = ( (document.body.clientWidth - aWidth)/2) - 5;
	alertBox.top = ( document.body.scrollTop + (document.body.clientHeight  - aHeight)/2) - 5;
}

//	shiftOpacity('shadowBox', 500);
//	shiftOpacity('alertLayer', 500);
//	opacity('shadowBox', 0, 100, 500);
//	opacity('alertLayer', 0, 100, 500);
//	opacity('alertShadow', 0, 100, 500);
//	opacity('alertBox', 0, 100, 500);
opacity('div1', 0, 100, 500);
//opacity('alertnotice', 0, 100, 500);
//<a href="javascript:opacity('div1', 0, 100, 500)">
alertShadow.visibility = "visible";
alertBox.visibility = "visible";
}

///   slide window functions    slide window in direction indicated
///      if CLOSE present then close out window, else restore it
function slideWinN(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1001; i+=slidespeed)
			window.moveBy(0, -slidespeed);
		if (close == 'CLOSE') window.close();
		  else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
				window.moveBy(0, +1000);
		}
	}
}
function slideWinNE(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1000; i+=slidespeed)
			window.moveBy(+slidespeed, -slidespeed);
		if (close == 'CLOSE') window.close();
		else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
				window.moveBy(-1000, +1000);
		}
	}
}
function slideWinE(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1001; i+=slidespeed)
			window.moveBy(slidespeed, 0);
		if (close == 'CLOSE') window.close();
		  else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
				window.moveBy(-1000, 0);
		}
	}
}
function slideWinSE(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1001; i+=slidespeed)
			window.moveBy(slidespeed, slidespeed);
		if (close == 'CLOSE') window.close();
		  else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
				window.moveBy(-1000, -1000);
		  }
	}
}
function slideWinS(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1001; i+=slidespeed)
			window.moveBy(0, slidespeed);
		if (close == 'CLOSE') window.close();
		  else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
				window.moveBy(0, -1000);
			}
	}
}
function slideWinSW(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1001; i+=slidespeed)
		window.moveBy(-slidespeed, +slidespeed);
		if (close == 'CLOSE') window.close();
		  else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
				window.moveBy(+1000, -1000);
			}
	}
}
function slideWinW(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1001; i+=slidespeed)
			window.moveBy(-slidespeed, 0);
		if (close == 'CLOSE') window.close();
		  else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
				window.moveBy(+1000, 0);
		  }
	}
}
function slideWinNW(close) {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1000; i+=slidespeed)
			window.moveBy(-slidespeed, -slidespeed);
	}
	if (close == 'CLOSE') window.close();
	  else 	if(( ie6 ) || ( ie5 ) || (ie4)) {
			window.moveBy(+1000, +1000);
	  }
}
	//   shrink window up and close it.
function shrinkUp() {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1000; i += 9) {
			window.resizeBy( -9, -9);
		}
	}
	window.close();
}
	//   shrink window down (and up) and close it.
function shrinkDown() {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
		for (var i = 1; i < 1000; i += 21) {
			window.resizeBy( -14, -14);
			window.moveBy( 7, 7);
		}
	}
	window.close();
}

	//   increase a window down and to the right, use this when window is positioned (not centered)
function growDown() {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
			winwidth = (window.screen.availWidth - (document.body.clientWidth + 0));
			winheight = (window.screen.availHeight - (document.body.clientHeight + 0));
			var sizeheight=1;
			for (sizewidth = 1; sizewidth < winwidth; sizewidth += 21) {
				window.resizeBy( +14, +14);
				if (sizeheight < winheight )
					sizeheight += 21;
		    }
			while (sizeheight < winheight ) {
					window.resizeBy( 0, +14);
					sizeheight += 21;
			}
	}
}


	//   increase a window in all 4 directions, use this for centered windows
function growOut() {
	if(( ie6 ) || ( ie5 ) || (ie4)) {
			winwidth = (window.screen.availWidth - document.body.clientWidth);
			winheight = (window.screen.availHeight - document.body.clientHeight);
			var sizeheight=1;
			for (sizewidth = 1; sizewidth < winwidth; sizewidth += 21) {
				window.resizeBy( +14, +14);
				window.moveBy( -7, -7);
				if (sizeheight < winheight )
					sizeheight += 21;
		    }
			while (sizeheight < winheight ) {
					window.resizeBy( 0, +14);
					window.moveBy( 0, -7);
					sizeheight += 21;
			}
	}
} 

///   raises and bumps the next letter, like a stadium wave
///       but must be over 6 characters in length
//var wavemessage = "Wave Message here";

function doWave()
{
		if (wavemessage.length > 6 )
		{
			for ( i=0;i != wavemessage.length;i++)
				{  txt=txt+"<span style='position:relative;' id='n"+i+"'>"+wavemessage.charAt(i)+"</span>"; }
			wave.innerHTML=txt;
			txt="";
			doWave1a();
		}  else { alert("Your message is to short"); }
}
function doWave1a()
{
	n0.style.left=-num2;
	if ( num2 != 9)
	{
		num2=num2+3;
		setTimeout("doWave1a()",50);
	}  else { doWave1b(); }
}
function doWave1b()
{
	n0.style.left=-num2;
	if ( num2 != 0)
	{ 
		num2=num2-3;
		setTimeout("doWave1b()",50);
	}  else { doWave2(); }
}
function doWave2() { 
	txt="";
	for(i=0;i != wavemessage.length;i++)
	{
		if ( i+num > -1 && i+num < 7)
		{
			txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+wavemessage.charAt(i)+"</span>";
		}  else { txt=txt+"<span>"+wavemessage.charAt(i)+"</span>"; }
	}
	wave.innerHTML=txt;
	txt="";
	if ( num != (-wavemessage.length))
	{
		num--;
		setTimeout("doWave2()",50);
	}  else
	{ 
			num=0;
			setTimeout("doWave()",50);
	}
}


//////   teletype scroller functions

function doText(tttext) 
{
	if (document.all) 
	{
		if (character <= tttext.length - 1)
		{
			to_print += tttext.charAt(character);
			teletext.innerHTML = to_print;
			character++;
		}  else  scrollIt();
	}
	setTimeout("doText(message)", 40);  //  speed of print out here higher = slower display
}

function scrollIt()
{
	if (ypos >= 260)
	{
		ypos -= 1;
		fade -= 4;
		if ( ypos < 265) { teletext.innerHTML = "" ;  }
	}  else
	{
		ypos = 300;
		character = 0;
		to_print = "";
		nextMessage();
		fade = 100;
	}
	teletext.style.top = ypos;
	teletext.filters.alpha.opacity = fade;
}

function nextMessage()
{
	message = next_message[next]
	if (next == 4) { 	next = 0; }
	 else next++;
}


//
//   script cookie functions
//
var expDays = 1;	// number of days the cookie should last
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function GetCookie (name) {  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) {    
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
			return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
		}  
	return null;
}

function SetCookie (name, value) {  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) +  
		((domain == null) ? "" : ("; domain=" + domain)) +    
		((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {  
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

function amt(){
	var count = GetCookie('count')
	if (count == null) {
		SetCookie('count','1')
	}
	else {
		var newcount = parseInt(count) + 1;
		DeleteCookie('count')
		SetCookie('count',newcount,exp)
   }
   return count;
}

function getCookieVal(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
	var count = GetCookie('count');
	if (count == null) {
		count=1;
		SetCookie('count', count, exp);  //  expires 1 day later
	}
	else {    //  commented out to not alter the exp date
		count++;
//		SetCookie('count', count, exp);
   }
   return count;
}



///      determine actual width and height of current window
//height = document.body.clientHeight;
//width = document.body.clientWidth;
//document.write(" actual width"+width+"     actual height"+height+"  <br>");
//avlwidth = window.screen.availWidth;
//avlheight = window.screen.availHeight;
//document.write(" available width"+avlwidth+"     available height"+avlheight+"  <br>");
//
//
//    create a new window, if top and left position not present (=> -1)
//                    then sort of centered in the available window size
//           always adjusted not to exceed available width or height
function newPopup(newpage, newname, l, t, w, h, scroll, resize, toolbars) {
//function timedPopup(newpage, newname, left, top, width, height, delay, timed, scrll, resze, tolbars,mnubars,stlocation) {
	pageurl = newpage;
	pagename = newname;
	adjtop = t;
	adjleft = l;
	if ( w >= window.screen.availWidth)
		adjwidth = (window.screen.availWidth - 20);  //  make less than max
	  else adjwidth = w;
	if ( h >= window.screen.availHeight)
		adjheight = (window.screen.availHeight - 20);  //  make less than max
	  else adjheight = h;
	//   if left position is less than zero then center window
	if ( adjleft < 0 ) {
		adjleft = ((window.screen.availWidth - adjwidth) /2);
	}
	//   if top is less than zero then center window
	if ( adjtop < 0 ) { 
		adjtop = ((window.screen.availHeight - adjheight) /2);
	}
	if ( scroll == 'SCROLL' )  scroll = 'yes';
	  else  scroll = 'no';
	if ( resize == 'RESIZE' )  resize = 'yes';
	  else  resize = 'no';
	if ( toolbars == 'yes' )  toolbars = 'yes';
	  else  toolbars = 'no';
//	winprops = 'top='+adjtop+',left='+adjleft+',width='+adjwidth+',height='+adjheight+',scrollbars='+scroll+',toolbar='+toolbars+','+resize;
	winprops = 'top='+adjtop+',left='+adjleft+',width='+adjwidth+',height='+adjheight+',scrollbars=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes';
	preview = window.open(newpage, pagename, winprops)
	if (parseInt(navigator.appVersion) >= 4) {
		preview.window.focus();
	}
}


//   create a new popup window,  with a delay to start  and a time out to close it
function timedPopup(newpage, newname, left, top, width, height, delay, timed, scrll, resze, tolbars,mnubars,stlocation) {
	pageurl = newpage;
	pagename = newname;
	l = (+left);
	t = (+top);
	w = (+width);
	h = (+height);
	scroll = scrll;
	resize =  resze;
	toolbars =  tolbars;
	menubars =  mnubars;
	setlocation =  stlocation;
	timeout = (+delay+timed);   //time in seconds to close new popup
	timer = setTimeout("Start()", delay*1000);
}

//   used by timed popup window
//    creates a popup window, if top and left position not present (=> -1)
//                    then sort of centered in the available window size
//           always adjusted not to exceed available width or height
function Start() {
	//   if top is less than zero then center window
	adjleft = (+l);
	adjtop = (+t);
	if ( w >= window.screen.availWidth)
		adjwidth = (window.screen.availWidth - 20);  //  make less than max
	  else adjwidth = w;
	if ( h >= window.screen.availHeight)
		adjheight = (window.screen.availHeight - 20);  //  make less than max
	  else adjheight = h;
	//   if left position is less than zero then center window
	if ( adjleft < 0 )
		adjleft =  ((window.screen.availWidth - adjwidth) /2);
	//   if top is less than zero then center window
	if ( adjtop < 0 )
		adjtop = ((window.screen.availHeight - adjheight) /2);

	if ( scroll == 'SCROLL' )  scroll = 'yes';
	  else  scroll = 'no';
	if ( toolbars == 'TOOLBARS' )  toolbars = 'yes';
	  else  toolbars = 'no';
	if ( menubars == 'MENUBARS' )  menubars = 'yes';
	  else  menubars = 'no';
	if ( setlocation == 'SETLOCATION' )  setlocation = 'yes';
	  else  setlocation = 'no';
	if ( resize == 'RESIZE' )  resize = 'yes';
	  else  resize = 'no';
	winprops = 'top='+adjtop+
		',left='+adjleft+
		',width='+adjwidth+
		',height='+adjheight+
		',scrollbars='+scroll+
		',toolbar='+toolbars+
		',menubar='+menubars+
		',location='+setlocation+
		',resizable='+resize;
		
//	var sizer = window.open("expn1","expn2","top=" +topdist+",left="+leftdist+",width=1,height=1,scrollbars=yes,,toolbar=yes,menubar=yes,location=yes,resizable=yes");
	
	win = window.open(pageurl, pagename, winprops);
	if (parseInt(navigator.appVersion) >= 4) win.window.focus();
	if (timeout > 0 ) setTimeout("win.close();", timeout*1000);
}


//     creates a window that expands to fill the screen
function expandingWindow(pageurl, leftdist, topdist, widthspeed, heightspeed, size) {
	// var leftdist = 0;    // distance to left edge of window
	// var topdist = 0;     // distance to top edge of window
	// var heightspeed = 4; // vertical scrolling speed (lower value = slower)
	// var widthspeed = 7;  // horizontal scrolling speed (lower value = slower)
	var widthrate = (+widthspeed);
	var heightrate = (+heightspeed);
	if (document.all) {
		if (size == "HALF") {
			winwidth = (((window.screen.availWidth - leftdist)/20) * 12);
			winheight = (((window.screen.availHeight - topdist)/20) * 12);
		} else if (size == "THIRD") {
				winwidth = (((window.screen.availWidth - leftdist)/20) * 8);
				winheight = (((window.screen.availHeight - topdist)/20) * 8);
			} else if (size == "QUARTER") {
					winwidth = (((window.screen.availWidth - leftdist)/20) * 6);
					winheight = (((window.screen.availHeight - topdist)/20) * 6);
				} else if (size == "EIGHTH") {
						winwidth = (((window.screen.availWidth - leftdist)/20)* 4);
						winheight = (((window.screen.availHeight - topdist)/20)* 4);
					} else if (size == "THREEQUARTER") {
							winwidth = (((window.screen.availWidth - leftdist)/20)* 16);
							winheight = (((window.screen.availHeight - topdist)/20)* 16);
						} else {   //if (size == "FULL") {    //  rest treated as full
								winwidth = window.screen.availWidth - leftdist;
								winheight = window.screen.availHeight - topdist;
							}

//	if(( ie6 ) || ( ie5 ) || (ie4)) {

		var sizer = window.open(pageurl,"expn2","top=" +topdist+",left="+leftdist+",width=100,height=100,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes");
		sizer.location = pageurl;
	if (parseInt(navigator.appVersion) >= 4) sizer.window.focus();
		//	following code expands window simultaneously by width (precedence) and height
		var sizeheight=1;
		for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthrate) {
			sizer.resizeTo(sizewidth, sizeheight);
			if (sizeheight < winheight )
				sizeheight += heightrate;
	    }
		while (sizeheight < winheight ) {
				sizer.resizeTo(sizewidth, sizeheight);
				sizeheight += heightrate;
		}
	} else
		window.location = pageurl;
}

//     creates a window that expands from the center of the screen to fill the screen
function explodingWindow(pageurl, leftdist, topdist, widthspeed, heightspeed, size) {
	// var leftdist = 0;    // distance to left edge of window
	// var topdist = 0;     // distance to top edge of window
	// var heightspeed = 20; // vertical scrolling speed (lower = slower)
	// var widthspeed = 24;  // horizontal scrolling speed (lower = slower)
	widthrate = ((widthspeed) / 2);
	heightrate = ((heightspeed) / 2);
	if (document.all) {
		if (size == "HALF") {
			winwidth = (((window.screen.availWidth - leftdist)/20) * 12);
			winheight =(((window.screen.availHeight - topdist)/20) * 12);
		} else if (size == "THIRD") {
				winwidth = (((window.screen.availWidth - leftdist)/20) * 8);
				winheight = (((window.screen.availHeight - topdist)/20) * 8);
			} else if (size == "QUARTER") {
					winwidth = (((window.screen.availWidth - leftdist)/20) * 6);
					winheight = (((window.screen.availHeight - topdist)/20) * 6);
				} else if (size == "EIGHTH") {
						winwidth = (((window.screen.availWidth - leftdist)/20)* 4);
						winheight = (((window.screen.availHeight - topdist)/20)* 4);
					} else if (size == "THREEQUARTER") {
							winwidth = (((window.screen.availWidth - leftdist)/20)* 16);
							winheight = (((window.screen.availHeight - topdist)/20)* 16);
						} else {   //if (size == "FULL") {    //  rest treated as full
								winwidth = window.screen.availWidth - leftdist;
								winheight = window.screen.availHeight - topdist;
							}
		//    open window in center of screen
		leftposition = ((window.screen.availWidth)/2);
		topposition = (( window.screen.availHeight)/2);

//	if(( ie6 ) || ( ie5 ) || (ie4)) {

// shrink the window 
//window.resizeBy(-200, -200);


		var sizer = window.open(pageurl,"expl2","top="+topposition+",left="+leftposition+",width=1,height=1,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes");
		//	following code expands window simultaneously by width (precedence) and height
	var sizeheight=1;
		for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthrate) {
			sizeheight += heightrate;
			sizer.resizeTo(sizewidth, sizeheight);
			sizewidth += widthrate;
			leftposition -= widthrate;
			topposition -= heightrate;
			sizer.moveTo(leftposition, topposition);
			if (sizeheight < winheight ) {
				sizeheight += heightrate;
				sizer.resizeTo(sizewidth, sizeheight);
			}
		}
		while (sizeheight < winheight ) {
				topposition -= heightrate;
				sizeheight += heightrate;
				sizer.moveTo(leftposition, topposition);
				sizer.resizeTo(sizewidth, sizeheight);
				sizeheight += heightrate;
		}
		sizer.location = pageurl;
	} else
		window.location = pageurl;
}

