// JavaScript 

// used products menu
function show(id) {
    document.getElementById(id).style.display = 'block';
    document.getElementById(id).style.visibility = 'visible';
    //window.setTimeout("document.getElementById('"+id+"').style.display = 'block';",1200);
    //window.setTimeout("document.getElementById('"+id+"').style.visibility = 'visible';",1200);
    }

function hide(id) {
    document.getElementById(id).style.display = 'none';
    document.getElementById(id).style.visibility = 'hidden';
    }
function makeChange(func, doswitch, id){
    if (doswitch == 1){
        eval(func);
    }
}

function mouseOver(id, func){
    var func = func +'(\''+ id + '\');';
    var doswitch = 1;
	//get func is undefined with following code... when I use window.setTimeout('runMoreCode(\''+someString+'\','+someNumber+')',10); I get an ')' expected error
	window.setTimeout("makeChange(func,doswitch)", 160);
}




function hideBalloon(id) {
    var tmpB = id;
    if (tmpB != 'phBalloonCopy') {
        //alert(tmpB);
        window.setTimeout("document.getElementById("+tmpB+").style.display = 'none';",1200);
        window.setTimeout("document.getElementById("+tmpB+").style.visibility = 'hidden';",1200);
        }
    }
// do nothing...
function donothing(foo) {

}

//Products Popup
function viewDecor(file) {
	url = '/images/products/decor/lg/' + file;
	winsize = 'width=515,height=515,'
	winattrib = winsize + 'menubar=no,scrollbars=no,titlebar=no';
	wallwin = window.open('','wallwindow',winattrib);
	wallwin.document.writeln('<html>');
	wallwin.document.writeln('<head><title>Coachmen RV Decor</title><link href="/assets/css/SportscoachRV.css" rel="stylesheet" type="text/css" media="screen" /></head>');
	wallwin.document.writeln('<body style="margin: 0px; font-size: 12px; background-color: #fff; background-image: none; padding: 5px;" onblur="javascript:window.close();">');
	wallwin.document.writeln('<img src="', url, '" alt="Sportscoach RV Decor" onclick="javascript:window.close();" />');
	wallwin.document.writeln('</body></html>');
	wallwin.document.close();
	wallwin.focus();
	wallwinstat="yes";
	}


function viewWood(file) {
	url = '/images/products/wood/lg/' + file;
	winsize = 'width=510,height=510,'

	winattrib = winsize + 'menubar=no,scrollbars=no,titlebar=no';
	wallwin = window.open('','wallwindow',winattrib);
	wallwin.document.writeln('<html>');
	wallwin.document.writeln('<head><title>Sportscoach RV Wood Decor</title><link href="/assets/css/SportscoachRV.css" rel="stylesheet" type="text/css" media="screen" /></head>');
	wallwin.document.writeln('<body style="margin: 0px; font-size: 12px; background-color: #fff; background-image: none; padding: 5px;" onblur="javascript:window.close();">');
	wallwin.document.writeln('<img src="', url, '" alt="Sportscoach RV Wood Decor" onclick="javascript:window.close();" />');
	wallwin.document.writeln('</body></html>');
	wallwin.document.close();
	wallwin.focus();
	wallwinstat="yes";
	}

var myWin;
function viewVideo(theURL) {
	if(myWin) {
		if(!myWin.closed) {myWin.focus();}
	}
	myWin = open(theURL,'loadVideo','width=750,height=575,scrollbars=no,resizable=yes');
	myWin.focus();
}

