/********************************************************************************************
* PageEar advertising CornerAd by Webpicasso Media
* Leave copyright notice.  
*
* Lizenzvereinbarung / License agreement
* http://www.webpicasso.de/blog/lizenzvereinbarungen-license-agreements/
*
* @copyright www.webpicasso.de
* @author    christian harz <pagepeel-at-webpicasso.de>
*********************************************************************************************/
 
var pagearSmallImg = '/images/peel/pageear_s.jpg'; 
var pagearSmallSwf = '/images/peel/pageear_s.swf'; 
var pagearBigImg = '/images/peel/pageear_b.jpg'; 
var pagearBigSwf = '/images/peel/pageear_b.swf'; 

// Movement speed of small pageear 1-4 (2=Standard)
var speedSmall = 2; 
// Mirror image ( true | false )
var mirror = 'true'; 
// Color of pagecorner if mirror is false
var pageearColor = '073c87';  
// URL to open on pageear click
var jumpTo = '/en/network/fokus-your-school';
// Browser target  (new) or self (self)
var openLink = 'self'; 
// Opens pageear automaticly (false:deactivated | 0.1 - X seconds to open) 
var openOnLoad = 'false';
// Second until pageear close after openOnLoad
var closeOnLoad = 3; 
// Set direction of pageear in left or right top browser corner (lt: left | rt: right )
var setDirection = 'rt'; 
// Fade in pageear if image completly loaded (0-5: 0=off, 1=slow, 5=fast )
var softFadeIn = 0; 
// Plays background music once abspielen (false:deactivated | URL:Mp3 File e.g. www.domain.de/mysound.mp3) 
var playSound = 'false' 
// Play sound on opening peel (false:deactivated | URL:Mp3 File e.g. www.domain.de/mysound.mp3) 
var playOpenSound = 'false'; 
// Play sound on closing peel (false:deactivated | URL:Mp3 File e.g. www.domain.de/mysound.mp3) 
var playCloseSound = 'false'; 
// Peel close first if button close will be clicked
var closeOnClick = 'false';
// Close text 
var closeOnClickText = 'Close';

var preLoadImage = new Image();
preLoadImage.src = pagearBigImg; 
 
/*
 *  Ab hier nichts mehr ändern  / Do not change anything after this line
 */ 

// Copyright
var copyright = 'Webpicasso Media, www.webpicasso.de';

// Size small peel 
var thumbWidth  = 100;
var thumbHeight = 100;

// Size big peel
var bigWidth  = 500;
var bigHeight = 500;

// Css style default x-position
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='+escape(copyright); 
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(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] = '-2px';
	document.getElementById("thumbDiv").style.top = '-1000px';
}

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

function writeObjects()
{ 

	// Check direction 
    if(setDirection == 'lt') {
        xPosBig = 'left:-1000px';  
        xPos = 'left';   
    } else {
        xPosBig = 'right:1000px';
        xPos = 'right';              
    }
	
 	var flashvars = {};
	var params = {wmode:'transparent'};
	var attributes = {};  
	
    // Write div layer for big swf
	document.write('<div id="bigDiv" style="position:absolute;width:'+ bigWidth +'px;height:'+ bigHeight +'px;z-index:9999;'+xPosBig+';top:-100px;"><div id="bigDiv_embed"></div></div>');    	
	swfobject.embedSWF(pagearBigSwf+"?"+ queryParams, "bigDiv_embed", bigWidth, bigHeight, "9.0.0", "expressInstall.swf",flashvars,params,attributes);

	
    // Write div layer for small swf
	document.write('<div id="thumbDiv" style="position:absolute;width:'+ thumbWidth +'px;height:'+ thumbHeight +'px;z-index:9999;'+xPos+':0px;top:0px;"><div id="thumbDiv_embed"></div></div>');
	swfobject.embedSWF(pagearSmallSwf+"?"+ queryParams, "thumbDiv_embed", thumbWidth, thumbHeight, "9.0.0", "expressInstall.swf",flashvars,params,attributes);
	
	
    setTimeout('document.getElementById("bigDiv").style.top = "-1000px";',100);
}


