//*************************************************************
//  MouseOver Functions
//*************************************************************
function switchImage(strId,blnState){
	//Purpose:	Provides "mouseover" functionality for all menu
	//          buttons on the KinderCare web site.
	//Accepts:  strId    - A page unique identifier for this rollover.
	//          blnState - A boolean value indicating whether the button
	//          is to be highlighted.
	//Returns:  Nothing.
	var strImageName = (blnState) ? "images/" + strId + "_on.gif" : "images/" + strId + "_off.gif";
	document.images[strId].src = strImageName;
}

//*************************************************************
//  Window Handling Functions
//*************************************************************
var objPreview = null;

function showImage(strImage,intWidth,intHeight){
	//Purpose:	Opens a window of the specified size, containing the passed image.
	//Accepts:  strImage  - The image file to display.
	//          intWidth  - The width of the window in pixels.
	//          intHeight - The height of the window in pixels.
	//Returns:  Nothing.
	var strURL     = 'template_image.asp?name=' + strImage;
	var strFeature = 'width=' + intWidth + ',height=' + intHeight + ',top=100,left=100,scrollbars=no';

	//Close the window if already open.
	closePopup();

	//Open window and display image.
	objPreview = window.open(strURL,'Preview',strFeature);

	//Give the new window focus.
	setTimeout('objPreview.focus();',250);
}


function showPage(strURL,intWidth,intHeight){
	//Purpose:	Opens a window of the specified size, containing the passed page.
	//Accepts:  strURL  - The page to display.
	//          intWidth  - The width of the window in pixels.
	//          intHeight - The height of the window in pixels.
	//Returns:  Nothing.
	var strFeature = 'width=' + intWidth + ',height=' + intHeight + ',top=100,left=100,scrollbars=no';

	//Close the window if already open.
	closePopup();

	//Open window and display image.
	objPreview = window.open(strURL,'Preview',strFeature);

	//Give the new window focus.
	setTimeout('objPreview.focus();',250);
}


function closePopup(){
	//Purpose:	Closes the image preview popup window.
	//Accepts:  Nothing.
	//Returns:  Nothing.

	//Close the popup window if open.
	if(objPreview && objPreview.open) objPreview.close();
}