function win_open(win_name, where, type_val) {

	var win_type = new Array();



	win_type[0]="menubar=no,scrollbars=yes,resizable=yes,width=640,height=500";	

	win_type[1]="menubar=no,scrollbars=yes,resizable=yes,width=725,height=450";

	// warranty question form
	win_type[2]="menubar=no,scrollbars=yes,resizable=yes,width=600,height=450";

	// floorplan popup
	win_type[3]="menubar=no,scrollbars=yes,resizable=yes,width=725,height=500";

	// listing details popup	
	win_type[4]="menubar=yes,scrollbars=yes,resizable=yes,width=620,height=500";
	// promo popup
	win_type[5]="menubar=yes,scrollbars=no,resizable=no,width=350,height=500";
	
	// video popup
	win_type[6]="menubar=no,scrollbars=no,resizable=no,width=650,height=480";

	// video popup
	win_type[7]="menubar=yes,scrollbars=yes,resizable=yes,width=600,height=500";

	// 2-for-1 promo popup
	win_type[8]="menubar=yes,scrollbars=yes,resizable=yes,width=725,height=600";

	win_name = window.open(where, win_name, win_type[type_val]);

	win_name.focus();

}





function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

  winName = window.open(theURL,winName,features);

	winName.focus();

}

function clistON(){
banxpos = (screen.width/2) + 266;
document.getElementById("clist").style.left = banxpos + "px";
document.getElementById("clist").style.visibility =  'visible';


}

function clistOFF(){
document.getElementById("clist").style.visibility =  'hidden';
}



function sizeFPwin() {

	window.resizeTo(740,750);

	moveTo(25,25)

	}


	

function sizeELVwin() {

	window.resizeTo(540,600);

	moveTo(25,25)

	}

	

	

function set_cookie(name, hours, domain, value) {

	if (hours) exp = new Date((new Date().getTime() + hours * 3600000));

	else exp = null;



	document.cookie = name + '=' + value + '; expires=' + exp.toGMTString() + ';';

}



function get_cookie(name) {

	index = document.cookie.indexOf(name);

	if (index != -1) { 

		countbegin = (document.cookie.indexOf("=", index) + 1);

		countend = document.cookie.indexOf(";", index);

		if (countend == -1) {

			countend = document.cookie.length;

		}

		if (document.cookie.substring(countbegin, countend) == 'leads pop up window') { ;}

		else {register_win_open('century_leads', 'http://www.centurycommunities.com/register_form.htm', 0);}

	}

	else {

		set_cookie('century_leads', 48, 'centurycommunities.com', 'leads pop up window');

		register_win_open('century_leads', 'http://www.centurycommunities.com/register_form.htm', 0);

	}

}

function register_win_open(win_name, where, type_val) {

	var win_type = new Array();



	win_type[0]="width=450,height=475,left=100,top=100,RESIZABLE,STATUS";

	

	win_name = window.open(where, win_name, win_type[type_val]);

	win_name.focus();

}



theObjects = document.getElementsByTagName("object");

for (var i = 0; i < theObjects.length; i++) {

	theObjects[i].outerHTML = theObjects[i].outerHTML;

}

// Load Flash

function loadFlash(movieName, movieWidth, movieHeight, version) { 

   document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + version + ",0,0,0\" width=\"" + movieWidth + "\" height=\"" + movieHeight + "\">"); 

   document.write("<param name=movie value=\"" + movieName + "\">"); 

   document.write("<param name=menu value=false>"); 

   document.write("<param name=quality value=high>"); 

   document.write("<embed src=\"" + movieName + "\" menu=false quality=high " + " pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"" + movieWidth + "\" height=\"" + movieHeight + "\">"); 

   document.write("</embed></object>"); 

}

//