function writeSWFHTML(divID, swfID, swfSrc, imgSrc, width, height, params)   {
		
		var strHTML = '';
		strHTML += '<object type="application/x-shockwave-flash" '; 
		strHTML += ' width="' + width + '" height="' + height + '" ';
		strHTML += ' id="' + swfID + '" name="' + swfID + '" data="' + swfSrc + '">';
		strHTML += ' <param name="movie" value="' + swfSrc + '" />';
		strHTML += ' <param name="wmode" value="transparent" />';
		strHTML += ' <param name="allowScriptAccess" value="sameDomain" />';
		if (params != '') strHTML += params;
		strHTML += ' <img src="' + imgSrc + '" alt="" height="' + height + '" width="' + width + '" border="0" hspace="0" vspace="0" align="left" />';
		strHTML += "</object>";
		
        //insert the HTML to the page
		if (document.getElementById(divID)) {
		    var divToSet = document.getElementById(divID);
		    divToSet.innerHTML = strHTML;
		}
}

function pagePeel() {
	this.linkUrl = '';
	this.smallSWF = '';
	this.smallImg = '';
	this.bigSWF = '';
	this.bigImg = '';
	this.trackImgTag = '';
	
	this.writeDiv = funcWriteDiv;
}

function sizeup987(){
	document.getElementById('jcornerBig').style.top = '0px';
	document.getElementById('jcornerSmall').style.top = '-1000px';
}

function sizedown987(){
	document.getElementById("jcornerSmall").style.top = "0px";
	document.getElementById("jcornerBig").style.top = "-1000px";
}

function funcWriteDiv() {
	var smallParams = 'ico=' + this.smallImg;
	var bigParams = 'big=' + this.bigImg + '&ad_url=' + this.linkUrl;

	// <jcornerSmall>
	document.write('<div id="jcornerSmall" style="position:absolute;width:100px;height:100px;z-index:9999;right:0px;top:0px;">');
	// object
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
	document.write(' id="jcornerSmallObject" width="100" height="100">');
	// object params
	document.write(' <param name="allowScriptAccess" value="always"/> ');
	document.write(' <param name="movie" value="'+ this.smallSWF +'?' + smallParams + '"/>');
	document.write(' <param name="wmode" value="transparent" />');
	document.write(' <param name="quality" value="high" /> ');
	document.write(' <param name="FlashVars" value="' + smallParams + '"/>');
	// embed
	document.write('<embed src="' + this.smallSWF + '?' + smallParams + '" name="jcornerSmallObject" wmode="transparent" quality="high" width="100" height="100" flashvars="' + smallParams + '" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	document.write('</object>');
	if (this.trackImgTag != '') {
		document.write(this.trackImgTag);
	}
	document.write('</div>');
	// </jcornerSmall>
	// <jcornerBig>
	document.write('<div id="jcornerBig" style="position:absolute;width:650px;height:650px;z-index:9999;right:0px;top:0px;">');
	// object
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
	document.write(' id="jcornerBigObject" width="650" height="650">');
	// object params
	document.write(' <param name="allowScriptAccess" value="always"/> ');
	document.write(' <param name="movie" value="' + this.bigSWF + '?'+ bigParams +'"/>');
	document.write(' <param name="wmode" value="transparent"/>');
	document.write(' <param name="quality" value="high" /> ');
	document.write(' <param name="FlashVars" value="' + bigParams + '"/>');
	// embed
	document.write('<embed src="'+ this.bigSWF + '?' + bigParams +'" id="jcornerBigEmbed" name="jcornerBigObject" wmode="transparent" quality="high" width="650" height="650" flashvars="' + bigParams + '" swliveconnect="true" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	document.write('</object></div>');
	// </jcornerBig>
	setTimeout('document.getElementById("jcornerBig").style.top = "-1000px";',1000);
}
