var pagearSmallSwf = 'http://www.erosguia.com/img/pageear_s.swf';
var pagearBigSwf = 'http://www.erosguia.com/img/pageear_b.swf'; 
var newpagearBigSwf = 'http://www.erosguia.com/img/pp_big.swf'; 
var speedSmall = 1; 
var mirror = 'true'; 
var pageearColor = '000000';  
var openLink = 'self'; 
var openOnLoad = 'false'; 
var closeOnLoad = 1; 
var setDirection = 'rt'; 
var softFadeIn = 0; 
var playSound = 'false';
var playOpenSound = 'false'; 
var playCloseSound = 'false'; 
var closeOnClick = 'false';
var closeOnClickText = 'Close';
var requiredMajorVersion = 6;
var requiredMinorVersion = 0;
var requiredRevision = 0;
var thumbWidth  = 175;
var thumbHeight = 175;
var bigWidth  = 500;
var bigHeight = 500;
var xPos = 'right';


// GET - Params
var queryParams = 'pagearSmallImg='+escape(pagearSmallImg); 
queryParams += '&pagearBigImg='+escape(pagearBigImg); 
queryParams += '&pageearColor='+pageearColor; 
queryParams += '&jumpTo='+escape(jumpTo); 
queryParams += '&openLink='+escape(openLink); 
queryParams += '&mirror='+escape(mirror); 
queryParams += '&copyright=Webpicasso Media, www.webpicasso.de'; 
queryParams += '&speedSmall='+escape(speedSmall); 
queryParams += '&openOnLoad='+escape(openOnLoad); 
queryParams += '&closeOnLoad='+escape(closeOnLoad); 
queryParams += '&setDirection='+escape(setDirection); 
queryParams += '&softFadeIn='+escape(softFadeIn); 
queryParams += '&playSound='+escape(playSound); 
queryParams += '&playOpenSound='+escape(playOpenSound); 
queryParams += '&playCloseSound='+escape(playCloseSound);  
queryParams += '&closeOnClick='+escape(closeOnClick); 
queryParams += '&closeOnClickText='+escape(utf8encode(closeOnClickText)); 
queryParams += '&lcKey='+escape(Math.random()); 
queryParams += '&bigWidth='+escape(bigWidth); 
queryParams += '&thumbWidth='+escape(thumbWidth); 

function openPeel(){
	document.getElementById('bigDiv').style.top = "0px";
	//document.getElementById('bigDiv').style[xPos] = '0px';
	document.getElementById("bigDiv").style.display = "block";
	document.getElementById('thumbDiv').style.top = "-1000px";
	document.getElementById("thumbDiv").style.display = "none";
}

function closePeel(){
	document.getElementById("bigDiv").style.top = "-1000px";
	document.getElementById("bigDiv").style.display = "none";
	
	document.getElementById("thumbDiv").style.display = "block";
	document.getElementById("thumbDiv").style.top = "0px";
}

function sizeup987(){
	document.getElementById('bigDiv').style.top = "0px";
	document.getElementById('thumbDiv').style.top = "-1000px";
}
function sizedown987(){
	document.getElementById("thumbDiv").style.top = "0px";
	document.getElementById("bigDiv").style.display = "none";
	
	document.getElementById("thumbDiv").style.display = "block";
	document.getElementById("bigDiv").style.top = "-1000px";
}


function writeObjects () { 
    
   
    // Check direction 
    if(setDirection == 'lt') {
        xPosBig = 'left:-1000px';  
        xPos = 'left';   
    } else {
        xPosBig = 'right:1000px';
        xPos = 'right';              
    }
    
	
	
    
	
 document.write('<div id="bigDiv" style="width:'+ bigWidth +'px;height:'+ bigHeight +'px;z-index:9999;'+xPos+':150px;top:-1000px;">'); 
	 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id="ppocornerBigObject" width="650" height="650">');
	 document.write('<param name="allowScriptAccess" value="always">');
	 document.write('<param name="movie" value="'+newpagearBigSwf+'?big='+pagearBigImg+'&ad_url='+jumpTo+'">');
	 document.write('<param name="wmode" value="transparent">');
	 document.write('<param name="quality" value="high">');
	 document.write('<param name="FlashVars" value="big='+pagearBigImg+'&ad_url='+jumpTo+'">');
	 document.write('<embed src="'+newpagearBigSwf+'?big='+pagearBigImg+'&ad_url='+jumpTo+'" id="ppocornerBigEmbed" name="ppocornerBigObject" wmode="transparent" quality="high" width="650" height="650" flashvars="big='+pagearBigImg+'&ad_url='+jumpTo+'" swliveconnect="true" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>');  
    document.write('</div>'); 
	
	
    document.write('<div id="thumbDiv" style="width:'+ thumbWidth +'px;height:'+ thumbHeight +'px;z-index:9999;'+xPos+':0px;top:0;">');

    	AC_FL_RunContent(
    				"src", pagearSmallSwf+'?'+ queryParams,
    				"width", thumbWidth,
    				"height", thumbHeight,
    				"align", "middle",
    				"id", "smallSwf",
    				"scale", "noscale",
    				"quality", "high",
    				"bgcolor", "#000000",
    				"name", "bigSwf",
    				"wmode", "transparent",
    				"allowScriptAccess","always",
    				"type", "application/x-shockwave-flash",
    				'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
    				"pluginspage", "http://www.adobe.com/go/getflashplayer"
    	);
    
    document.write('</div>'); 
	setTimeout('document.getElementById("bigDiv").style.top = "-1000px";',100);
}

document.write("<style> #bigDiv{position:absolute;top:expression(0+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px');}  ");
document.write("body > div#bigDiv {position:fixed;} ");
document.write("#thumbDiv{position:absolute; top:expression(0+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px');}  ");
document.write("body > div#thumbDiv {position:fixed;} ");
document.write("</style> ");

function utf8encode(txt) { 
    txt = txt.replace(/\r\n/g,"\n");
    var utf8txt = "";
    for(var i=0;i<txt.length;i++) {        
        var uc=txt.charCodeAt(i); 
        if (uc<128) {
            utf8txt += String.fromCharCode(uc);        
        } else if((uc>127) && (uc<2048)) {
            utf8txt += String.fromCharCode((uc>>6)|192);
            utf8txt += String.fromCharCode((uc&63)|128);
        } else {
            utf8txt += String.fromCharCode((uc>>12)|224);
            utf8txt += String.fromCharCode(((uc>>6)&63)|128);
            utf8txt += String.fromCharCode((uc&63)|128);
        }        
    }
    return utf8txt;
}
