// TODO: Refactor! Create proper constructor
// Documentation and updates:
// http://www.marcofolio.net/webdesign/create_a_peeling_corner_on_your_website.html
// 'http://www.oandp.org/olc/academy/'
var jaaspeel = new Object();

jaaspeel.ad_url = escape('assets/upload/CornerPeel/URL.asp');

jaaspeel.small_path = 'assets/flash/peel_small.swf';
jaaspeel.small_image = escape('assets/upload/CornerPeel/CornerPeel-sm.jpg');
jaaspeel.small_width = '100';
jaaspeel.small_height = '100';
jaaspeel.small_params = 'ico=' + jaaspeel.small_image;

jaaspeel.big_path = 'assets/flash/peel_large.swf';
jaaspeel.big_image = escape('assets/upload/CornerPeel/CornerPeel-Lrg.jpg');
jaaspeel.big_width = '650';
jaaspeel.big_height = '650';
jaaspeel.big_params = 'big=' + jaaspeel.big_image + '&ad_url=' + jaaspeel.ad_url;

function sizeup987(){
	document.getElementById('jcornerBig').style.top = '61px';
	document.getElementById('jcornerSmall').style.top = '-1000px';
}

function sizedown987(){
	document.getElementById("jcornerSmall").style.top = "61px";
	document.getElementById("jcornerBig").style.top = "-1000px";
}

jaaspeel.putObjects = function () {
	// <jcornerSmall>
	document.write('<div id="jcornerSmall" style="position:absolute;width:'+ jaaspeel.small_width +'px;height:'+ jaaspeel.small_height +'px;z-index:9999;right:0px;top:61px;">');
	document.write('<object id="jcornerSmallObject" type="application/x-shockwave-flash" data="'+ jaaspeel.small_path +'?'+ jaaspeel.small_params +'" width="'+jaaspeel.small_width+'" height="'+jaaspeel.small_height+'">');
	document.write(' <param name="allowScriptAccess" value="always" />');
	document.write(' <param name="movie" value="'+ jaaspeel.small_path +'?'+ jaaspeel.small_params +'" />');
	document.write(' <param name="wmode" value="transparent" />');
	document.write(' <param name="quality" value="high" /> ');
	document.write(' <param name="FlashVars" value="'+jaaspeel.small_params+'" />');
	document.write('</object></div>');
	// </jcornerSmall>
	// <jcornerBig>
	document.write('<div id="jcornerBig" style="position:absolute;width:'+ jaaspeel.big_width +'px;height:'+ jaaspeel.big_height +'px;z-index:9999;right:0px;top:61px;">');
	document.write('<object id="jcornerBigObject" type="application/x-shockwave-flash" data="'+ jaaspeel.big_path +'?'+ jaaspeel.big_params +'" width="'+ jaaspeel.big_width +'" height="'+ jaaspeel.big_height +'">');
	document.write(' <param name="allowScriptAccess" value="always" />');
	document.write(' <param name="movie" value="'+ jaaspeel.big_path +'?'+ jaaspeel.big_params +'" />');
	document.write(' <param name="wmode" value="transparent" />');
	document.write(' <param name="quality" value="high" /> ');
	document.write(' <param name="FlashVars" value="'+ jaaspeel.big_params +'" />');
	document.write('</object></div>');
	// </jcornerBig>
	setTimeout('document.getElementById("jcornerBig").style.top = "-1000px";',1000);
}

jaaspeel.putObjects();
