function insertFlash(url, width, height, alt_text, is_transparent, object_id)
{
	document.write('<object ');
	if(object_id) document.write('id="'+object_id+'" ');
	document.writeln('classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" alt="'+alt_text+'">');
	document.writeln('<param name=movie value="'+url+'"');
	document.writeln('<param name=quality value=high>');
	if(is_transparent>0) document.writeln('<param name="wmode" value="transparent">');
	document.write('<embed src="'+url+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" ');
	if(is_transparent>0) document.write('wmode="transparent" ');
	document.writeln('alt="'+alt_text+'"></embed>');
	document.writeln('</object>');
}

<!--
function insertIPXold(url){
document.writeln('<OBJECT ID=\"IpixX1\" WIDTH=370 HEIGHT=370 ');
document.writeln('CLASSID=\"CLSID:11260943-421B-11D0-8EAC-0000C07D88CF\" ');
document.writeln('CODEBASE=\"http://www.ipix.com/download/ipixx.cab#version=6,2,0,5\">');
document.writeln('<PARAM NAME=\"IPXFILENAME\" VALUE=\"../IPIX/'+url+'.ipx\">');
document.writeln('<embed src=\"../IPIX/'+url+'.ipx\" border=0 width=370 height=370 ');
document.writeln('palette=\"FOREGROUND\" type=\"application/x-ipix\" pluginsPage=\"http://www.ipix.com/cgi-bin/download.cgi\">');
document.writeln('</embed></OBJECT>');
}
//-->


<!--
function insertIPX(url){
document.writeln('<APPLET name=\"IpixViewer\" code=\"IpixViewer.class\" ');
document.writeln('archive=\"../IPIX/IpixViewer.jar\" width=\"370\" height=\"370\">');
document.writeln('<PARAM NAME=\"url\" VALUE=\"../IPIX/'+url+'.ipx\">');
document.writeln('<PARAM NAME=\"toolbar\" VALUE=\"on\">');
document.writeln('<PARAM NAME=\"initfov\" VALUE=\"0\">');
document.writeln('<PARAM NAME=\"spinspeed\" VALUE=\"4\">');
document.writeln('<PARAM NAME=\"spinstyle\" VALUE=\"flat\"></APPLET>');
}
//-->



function checkSetClass(elementID, newClassName)
{
	if(document.getElementById(elementID).className!=newClassName) document.getElementById(elementID).className=newClassName;
}

function checkShow()
{
	if(document.body.clientWidth>=1000) checkSetClass('opt_col', 'opti');
	else checkSetClass('opt_col', 'opti_none');
}


<!--
function openWindow(URLpage)
{
	var generalWin;
	generalWin = window.open(URLpage,"portfolioWindow","width=612,height=600,toolbar=no,location=0,directory=no,status=no,scrollbars=yes,resizable=no");
	generalWin.focus();
}
//-->

<!--
function openWindowPano(URLpage)
{
	var generalWin;
	generalWin = window.open(URLpage,"portfolioWindow","width=565,height=480,toolbar=no,location=0,directory=no,status=no,scrollbars=yes,resizable=no");
	generalWin.focus();
}
//-->

<!--
function openWindowPro(URLpage, tmp)
{
	var generalWin;
	generalWin = window.open(URLpage,"portfolioWindow","width=612,height="+tmp+",toolbar=no,location=0,directory=no,status=no,scrollbars=no,resizable=no");
	generalWin.focus();
}

function openWindowAnySize(URLpage, tmpw, tmph)
{
	var generalWin;
	generalWin = window.open(URLpage,"portfolioWindow","width="+tmpw+",height="+tmph+",toolbar=no,location=0,directory=no,status=no,scrollbars=no,resizable=no");
	generalWin.focus();
}
//-->

<!--
function openPictureWindow(Title,imageName,imageHeight,Alt)
{
	var generalWin;
	var tmp=imageHeight+130;
	generalWin = window.open("","","width=612,height="+tmp+",toolbar=no,location=0,directory=no,status=no,scrollbars=no,resizable=no");
	generalWin.document.open();

	generalWin.document.write('<html><head><title>'+Title+'</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">');
	generalWin.document.write('<link rel=\"stylesheet\" href=\"../woo_pop.css\" type=\"text/css\"></head>');
	generalWin.document.write('<body bgcolor=\"#FFFFFF\" text=\"#000000\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><center>');
  	generalWin.document.write('<table width=\"592\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"popup\">');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr class=\"color\">');
   generalWin.document.write('<td width=\"495\" height=\"35\" align=\"left\" class=\"Header\">'+Alt+'</td><td width=\"97\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr><td colspan=\"2\" align=\"center\" class=\"bigimg\"><img src=\"../galleryphotos/'+imageName+'\"></td></tr>');
	generalWin.document.write('<tr><td colspan=\"2\" align=\"center\"><p class=\"comment\">Images may include options and furnishings not included as standard</p></td></tr>');
   generalWin.document.write('<tr class=\"color\">');
   generalWin.document.write('<td valign=\"middle\" height="35" align=\"left\" class=\"copy\"><span>&copy;2010 Woodland Park, Inc.</span><br>Manufacturers of Recreational Park Trailers</td>');
   generalWin.document.write('<td valign=\"middle\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
	generalWin.document.write('<tr><td class=\"clin\"></td></tr></table></center></body></html>');

	generalWin.document.close();
	generalWin.document.focus();
}
//-->

/*function printOptCol(tagBegin)
{
	if(document.body.clientWidth>=1000) document.write(tagBegin+' class="opti_none">');
	else document.write(tagBegin+' class="opti_none">');
}*/

function printRightHandCol()
{
	if(document.body.clientWidth>=1000)
		document.writeln('<td align="center" id="opt_col" class="opti"><iframe src="/optional.html" width="163" height="735" scrolling="no" frameborder="0"></iframe></td>');
	else
		document.writeln('<td align="center" id="opt_col" class="opti_none"><iframe src="/optional.html" width="163" height="735" scrolling="no" frameborder="0"></iframe></td>');
}

<!--
function openPictureWindow2(Title,imageName,imageHeight,Alt)
{
	var generalWin;
	var tmp=imageHeight+130;
	generalWin = window.open("","","width=612,height="+tmp+",toolbar=no,location=0,directory=no,status=no,scrollbars=no,resizable=no");
	generalWin.document.open();

	generalWin.document.write('<html><head><title>'+Title+'</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">');
	generalWin.document.write('<link rel=\"stylesheet\" href=\"woo_pop.css\" type=\"text/css\"></head>');
	generalWin.document.write('<body bgcolor=\"#FFFFFF\" text=\"#000000\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><center>');
  	generalWin.document.write('<table width=\"592\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"popup\">');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr class=\"color\">');
   generalWin.document.write('<td width=\"495\" height=\"35\" align=\"left\" class=\"Header\">'+Alt+'</td><td width=\"97\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr><td colspan=\"2\" align=\"center\" class=\"bigimg\"><img src=\"planttour/'+imageName+'\"></td></tr>');
   generalWin.document.write('<tr class=\"color\">');
   generalWin.document.write('<td valign=\"middle\" height="35" align=\"left\" class=\"copy\"><span>&copy;2007 Woodland Park, Inc.</span><br>Manufacturers of Recreational Park Trailers</td>');
   generalWin.document.write('<td valign=\"middle\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
	generalWin.document.write('<tr><td class=\"clin\"></td></tr></table></center></body></html>');

	generalWin.document.close();
	generalWin.document.focus();
}
//-->

<!--
function openPictureWindow3(Title,imageName,imageHeight,Alt)
{
	var generalWin;
	var tmp=imageHeight+130;
	generalWin = window.open("","","width=980,height="+tmp+",toolbar=no,location=0,directory=no,status=no,scrollbars=yes,resizable=no");
	generalWin.document.open();

	generalWin.document.write('<html><head><title>'+Title+'</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">');
	generalWin.document.write('<link rel=\"stylesheet\" href=\"woo_pop.css\" type=\"text/css\"></head>');
	generalWin.document.write('<body bgcolor=\"#FFFFFF\" text=\"#000000\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><center>');
  	generalWin.document.write('<table width=\"592\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"popup\">');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr class=\"color\">');
   generalWin.document.write('<td width=\"495\" height=\"35\" align=\"left\" class=\"Header\">'+Alt+'</td><td width=\"97\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr><td colspan=\"2\" align=\"center\" class=\"bigimg\"><img src=\"planttour/'+imageName+'\"></td></tr>');
   generalWin.document.write('<tr class=\"color\">');
   generalWin.document.write('<td valign=\"middle\" height="35" align=\"left\" class=\"copy\"><span>&copy;2007 Woodland Park, Inc.</span><br>Manufacturers of Recreational Park Trailers</td>');
   generalWin.document.write('<td valign=\"middle\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
	generalWin.document.write('<tr><td class=\"clin\"></td></tr></table></center></body></html>');

	generalWin.document.close();
	generalWin.document.focus();
}
//-->

<!--
function openPictureWindow4(Title,imageName,imageHeight,Alt,windowWidth)
{
	var generalWin;
	var tmp=imageHeight+130;
	generalWin = window.open("","","width="+windowWidth+",height="+tmp+",toolbar=no,location=0,directory=no,status=no,scrollbars=yes,resizable=no");
	generalWin.document.open();

	generalWin.document.write('<html><head><title>'+Title+'</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">');
	generalWin.document.write('<link rel=\"stylesheet\" href=\"woo_pop.css\" type=\"text/css\"></head>');
	generalWin.document.write('<body bgcolor=\"#FFFFFF\" text=\"#000000\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"><center>');
  	generalWin.document.write('<table width=\"592\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"popup\">');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr class=\"color\">');
   generalWin.document.write('<td width=\"495\" height=\"35\" align=\"left\" class=\"Header\">'+Alt+'</td><td width=\"*\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
   generalWin.document.write('<tr><td class=\"clin\"></td></tr><tr><td colspan=\"2\" align=\"center\" class=\"bigimg\"><img src=\"'+imageName+'\"></td></tr>');
   generalWin.document.write('<tr class=\"color\">');
   generalWin.document.write('<td valign=\"middle\" height="35" align=\"left\" class=\"copy\"><span>&copy;2007 Woodland Park, Inc.</span><br>Manufacturers of Recreational Park Trailers</td>');
   generalWin.document.write('<td valign=\"middle\" align=\"right\" class=\"Header\"><a href=\"javascript:self.close()\" class=\"close\">Close Window</a></td></tr>');
	generalWin.document.write('<tr><td class=\"clin\"></td></tr></table></center></body></html>');

	generalWin.document.close();
	generalWin.document.focus();
}
//-->


function printOptCol(tagBegin)
{
	if(document.body.clientWidth>=1000) document.write(tagBegin+' class="opti_none">');
	else document.write(tagBegin+' class="opti_none">');
}

<!--
function gotowpaa() {
location.href='http'+'://'+'www.'+'companycasuals.'+'com/'+'woodlandpark/';
}

function gotologo(id) {
if(id == 1) location.href='http'+'://'+'www.'+'rptia.'+'org';
if(id == 2) location.href='http'+'://'+'www.'+'crva.'+'ca';
if(id == 3) location.href='http'+'://'+'www.'+'qai.'+'org';
}
//-->

<!-- Begin
// test variables
var myHeight = 500;
var isResizable = true;

function createTarget(form) {
_target = form.target;
_colon = _target.indexOf(":");
if(_colon != -1) {
form.target = _target.substring(0,_colon);
form.args = _target.substring(_colon+1);
} else if(typeof(form.args)=="undefined") {
form.args = "";
}
if(form.args.indexOf("{")!=-1) {
_args = form.args.split("{");
form.args = _args[0];
for(var i = 1; i < _args.length;i++) {
_args[i] = _args[i].split("}");
form.args += eval(_args[i][0]) + _args[i][1];
   }
}
form.args = form.args.replace(/ /g,"");
_win = window.open('',form.target,form.args);
if(typeof(focus)=="function")
_win.focus();
return true;
}
//  End -->

// cookies-related functions

function GetArgument(name)
{
	var ss=unescape(window.location.search.substring(1));
	var re=new RegExp(name+"=([^&]*)");
	var ar=ss.match(re);
	if(ar) return ar[1]; else return null;
}

function Set_Cookie( name, value, expires, path, domain, secure )
{
  // set time, it's in milliseconds
  var today = new Date();
  today.setTime( today.getTime() );

  // expires is specified in days
	// if expires=='' cookie will only last as long as the current session of the visitor

  /*
  if the expires variable is set, make the correct
  expires time, the current script below will set
  it for x number of days, to make it for hours,
  delete * 24, for minutes, delete * 60 * 24
  */
  if ( expires )
  {
    expires = expires * 1000 * 60 * 60 * 24;
  }
  var expires_date = new Date( today.getTime() + (expires) );

  document.cookie = name + "=" +escape( value ) +
  ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
  ( ( path ) ? ";path=" + path : "" ) +
  ( ( domain ) ? ";domain=" + domain : "" ) +
  ( ( secure ) ? ";secure" : "" );
}


function Get_Cookie( check_name )
{
	// first we'll split this cookie up into name/value pairs
	// note: document.cookie only returns name=value, not the other components
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; // set boolean t/f default f

	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		// now we'll split apart each name=value pair
		a_temp_cookie = a_all_cookies[i].split( '=' );
		// and trim left/right whitespace while we're at it
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');

		// if the extracted name matches passed check_name
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found )
	{
		return null;
	}
}

function Delete_Cookie( name, path, domain )
{
  if ( Get_Cookie( name ) ) document.cookie = name + "=" +
  ( ( path ) ? ";path=" + path : "") +
  ( ( domain ) ? ";domain=" + domain : "" ) +
  ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

var cookiesEnabled=false;

function CheckCookiesEnabled()
{
	cookiesEnabled=false;
	var cName='TestCookiesEnabled';
	Set_Cookie(cName, 'none', '', '/', '', '');
	if(Get_Cookie(cName))
	{
		Delete_Cookie(cName, '/', '');
		cookiesEnabled=true;
	}
	return cookiesEnabled;
}

// dealer code checking
var dcCookie='DealerCode';

function CheckSetDealerCode()
{
	var code=GetArgument('code');
	if(code) Set_Cookie(dcCookie, code, '', '/', '', '');
}

function DealerLocatorDiv()
{
	CheckSetDealerCode();
	if(Get_Cookie(dcCookie) || !CheckCookiesEnabled()) document.write('<div style="display: none;">');
	else document.write('<div>');
}

function DealerLocatorFlash(name,param)
{
	CheckSetDealerCode();
	if(Get_Cookie(dcCookie) || !CheckCookiesEnabled()) document.write('<script>insertFlash("/flash/'+name+'2.swf?'+param+'", 54, 765, "Menu", 0)</script>');
	else document.write('<script>insertFlash("/flash/'+name+'.swf?'+param+'", 54, 765, "Menu", 0)</script>');
}

function DealerLocatorP()
{
	CheckSetDealerCode();
	if(Get_Cookie(dcCookie) || !CheckCookiesEnabled()) document.write('<p class="li" style="display: none;">');
	else document.write('<p class="li">');
}

function valForm(form)
{
	for(var i in form.elements)
	{
		try
		{
			if((form.elements[i].type=="text" || form.elements[i].type=="textarea") && form.elements[i].className=="required" && form.elements[i].value=="")
			{
				alert("Please fill all the required fields.");
				form.elements[i].focus();
				return false;
			}
		}
		catch(e) {}
	}
	return true;
}
