/*
 Das Copyright dieses Scriptes liegt beim Autor.
 patched by Paul Philippov, paul@ppds.ws
*/

image_small = new Array();
image_small[0] = 'http://gospelmusicians.com/peel/images/small1.gif';
image_small[1] = 'http://gospelmusicians.com/peel/images/small1.gif';
image_small[2] = 'http://gospelmusicians.com/peel/images/small1.gif';

image_big = new Array();
image_big[0] = 'http://gospelmusicians.com/peel/images/PEEL-BANNER-GM-MALL2.jpg';
image_big[1] = 'http://gospelmusicians.com/peel/images/PEEL-BANNER-GM-STORE3.jpg';
image_big[2] = 'http://gospelmusicians.com/peel/images/PEEL-BANNER-GM-STORE5.jpg';

GoTo = new Array();
GoTo[0] = 'http://store.gospelmusicians.com/';
GoTo[1] = 'http://store.gospelmusicians.com/';
GoTo[2] = 'http://store.gospelmusicians.com/';

var q = GoTo.length;
var nr = Math.round((q - 1) * Math.random());
var Link = GoTo[nr];
var Image1 = image_small[nr];
var Image2 = image_big[nr];
var esel = new Object();

esel.ad_url = escape(Link);
esel.small_path = 'http://gospelmusicians.com/peel/cornersmall.swf';
esel.small_image = escape(Image1);
esel.small_width = '100';
esel.small_height = '100';
esel.small_params = 'ico=' + esel.small_image;

esel.big_path = 'http://gospelmusicians.com/peel/cornerbig.swf';
esel.big_image = escape(Image2);
esel.big_width = '650';
esel.big_height = '650';
esel.big_params = 'big=' + esel.big_image + '&ad_url=' + esel.ad_url;

function sizeup987() {
        document.getElementById('eselcornerBig').style.top = '0';
        document.getElementById('eselcornerSmall').style.top = '-1000px';
}

function sizedown987() {
        document.getElementById("eselcornerSmall").style.top = '0';
        document.getElementById("eselcornerBig").style.top = '-1000px';
}

function swf_html(id, width, height, path, params) {
   document.write('<div id="eselcorner'+id+'" style="position:absolute;width:'+width+'px;height:'+height+'px;z-index:9999;right:0;top:-1000px;">');
   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="esel'+id+'cornerObject" width="'+width+'" height="'+height+'">');
   document.write(' <param name="allowScriptAccess" value="always" /> ');
   document.write(' <param name="movie" value="'+path+'?'+params+'"/>');
   document.write(' <param name="wmode" value="transparent" />');
   document.write(' <param name="quality" value="high" /> ');
   document.write(' <param name="FlashVars" value="'+params+'"/>');
   document.write('<embed src="'+path+'?'+params+'" wmode="transparent" quality="high" width="'+width+'" height="'+height+'" flashvars="'+params+'" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
   document.write('</object></div>');
   document.write('</script>');
}

function renderHtml() {
   swf_html('Small', esel.small_width, esel.small_height, esel.small_path, esel.small_params);
   swf_html('Big', esel.big_width, esel.big_height, esel.big_path, esel.big_params);
   setTimeout('sizedown987()', 500);
}

window.onload = renderHtml();