/// this function is used in the printer friendly floorplan pages to toggle between first and second floor

//params
//src = the source of the floorplan file being clicked on
//style = the on state style
//obj = the id of the link that the user is clicking on 
//
function toggle_fp(src,style,obj)
{
	if(obj == 'fp_1')
	{
		document.getElementById('fp_2').className = 'fp_nav_off';
		document.getElementById(obj).className = style;
		document.fp_img.src = "../media/communities/" + src;
	}
	else
	{
		document.getElementById('fp_1').className = 'fp_nav_off';
		document.getElementById(obj).className = style;
		document.fp_img.src = "../media/communities/" + src;
	}
}

/// popup window function
function popup(URL,w,h) {

day = new Date();
id = day.getTime();

var width = w;
var height = h;

var left = ((screen.width-width)/2);
var top = ((screen.height-height)/2);

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + '');");
}

///change out rendering on project page
function swap_renderings(style,link_obj,img_obj,rendering_filename,count)
{
	i = 1;
	
	for (i = 1; i <= count; i++ )
	{
		obj = 'r_' + i;
		//if ( obj != link_obj )
		//{
			document.getElementById(obj).className = 'fp_nav_off';
		//}
	}
	document.getElementById(img_obj).src='../media/communities/' + rendering_filename;
	document.getElementById(link_obj).className = style;
}



/* 
     THE CHECK() FUNCTION HAS BEEN MOVED INTO THE ONLY FILE THAT USES IT: /INTERESTLIST/INDEX.PHP 
*/

