var urlImageSmall = "http://www.bierhals-online.de/images/pagepeel_small.jpg";
// set the complete URL of the small image
var urlImageBig = "http://www.bierhals-online.de/images/pagepeel_big.jpg";
// set the complete URL of the large image
var urlPagePeel = "http://www.bierhals-online.de/Scripts/";
//"http://www.zanox-affiliate.de/ppv/images/programs/53/_pagepeel/";
// set the complete URL of the swf files

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
	args=MM_showHideLayers.arguments;
	var testval = args[0].split(",")
	if(testval[0] == 'small'){
		changeDiv(args);
	}
	else{
		window.setTimeout("changeDiv(args)",720);
	}
}

function changeDiv(args){
 	var p,v,obj;
 	//alert(args[0]+" ## "+args[2]);
  args1 = args[0].split(",");
  args2 = args[1].split(",");
  
  for (var i=0; i<args1.length; i++){
  		obj=MM_findObj(args1[i]);
  		
  		if (obj!=null){
  			v=args2[i];
    		
    		if (obj.style){
    			obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;
    		}
    	}
    	
    	if(obj){
    		obj.visibility=v;
    	}
  	}
}

function writePeel(zanoxLink){
	
	document.writeln('<style type="text/css">');
	document.writeln('#small{position:absolute;right:0px;top:0px;width:150px;height:150px;z-index:1000;visibility: visible;}');
	document.writeln('#big{position:absolute;right:0px;top:0px;width:600px;height:600px;z-index:2000;visibility: Hidden;}');
	document.writeln('</style>');
	
	document.writeln('<div id="small">');
	document.writeln('<object id="swfSmall" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="150" height="150">');
	document.writeln('<param name="movie" value="' + urlPagePeel + 'small_v2.swf?imageSmall='+urlImageSmall+'&incomingURL='+zanoxLink+'" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="wmode" value="transparent" />');
	document.writeln('<embed src="' + urlPagePeel + 'small_v2.swf?imageSmall='+urlImageSmall+'&incomingURL='+zanoxLink+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="150" wmode="transparent"></embed>');
	document.writeln('</object>');
	document.writeln('</div>');
	
	document.writeln('<div id="big">');
	document.writeln('<object id="swfBig" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="600" height="600">');
	document.writeln('<param name="movie" value="' + urlPagePeel + 'big_v2.swf?imageBig='+urlImageBig+'&incomingURL='+zanoxLink+'" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="wmode" value="transparent"  />'); 
	document.writeln('<embed src="' + urlPagePeel + 'big_v2.swf?imageBig='+urlImageBig+'&incomingURL='+zanoxLink+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="600" height="600" wmode="transparent"></embed>');
	document.writeln('</object>');
	document.writeln('</div>');
	
	document.writeln('<scr'+'ipt type="text/javascript">');
	document.writeln('document.getElementById("swfSmall").onmouseover = function(){MM_showHideLayers("small,big","hide,show")};');
	document.writeln('document.getElementById("swfBig").onmouseout = function(){MM_showHideLayers("big,small","hide,show")};');
	document.writeln('</scr'+'ipt>');


}
