//  To use this script, simply define the variables below:

var link  = "";			// Link URL, if want the image to be a link.
var floaterCookieName = "";
var expireInXDays = 0;
var showFloater;
var width = '250';
var height = '270';
var file = 'shortsale-wov.swf';
document.write("<style type=\"text/css\"><!--\n");
document.write("#float_pane {position: absolute; bottom:0px; right:-50px; z-index:10000;}\n");
document.write("body > div#float_pane {position: fixed;}\n");
document.write("--></style>\n");

if ( floaterCookieName == "" ) { //if no cookie name is provided then always show floater
	showFloater = true;
} else {
	if ( getCookie(floaterCookieName) == "" ) { // cookie not found so show floater
		showFloater = true;
		// set cookie so it isn't shown the next time
		setFloaterCookie(floaterCookieName)
	} else { // don't show the floater
		showFloater = false;
	}
}

if ( showFloater ) {
	document.write('<div id="float_pane">\n');
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+width+'" height="'+height+'" id="FlashID">');
	document.write('<param name="movie" value="'+file+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="swfversion" value="6.0.65.0" />');
	document.write('<param name="expressinstall" value="../videos/expressInstall.swf" />');
	document.write('<!--[if !IE]>-->');
	document.write('<object type="application/x-shockwave-flash" data="'+file+'" width="'+width+'" height="'+height+'">');
	document.write('<!--<![endif]-->');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="swfversion" value="6.0.65.0" />');
	document.write('<param name="expressinstall" value="../videos/expressInstall.swf" />');
	document.write('<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->');
	document.write('<div>');
	document.write('<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>');
	document.write('<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>');
	document.write('</div>');
	document.write('<!--[if !IE]>-->');
	document.write('</object>');
	document.write('<!--<![endif]-->');
	document.write('</object>');
	document.write('</div>');
}

function getCookie(c_name)
{
	if (document.cookie.length>0) {
		c_start=document.cookie.indexOf(c_name + "=")
		if (c_start!=-1) { 
			c_start=c_start + c_name.length+1 
			c_end=document.cookie.indexOf(";",c_start)
			if (c_end==-1) c_end=document.cookie.length
			return unescape(document.cookie.substring(c_start,c_end))
		} 
	}
	return ""
}

function setFloaterCookie(c_name)
{
	var exp = new Date();
	exp.setDate(exp.getDate() + expireInXDays);
	document.cookie=c_name+ "=1;expires=" + exp.toGMTString();
}

function hideDiv()
{
     var videoElement = document.getElementById("float_pane");
     videoElement.innerHTML = "&nbsp;";
}

