//********************************************************************************************************************
// PowerUpMySite.com Page Curl Pro v2 
//
// Please refer to PDF documentation included with package for detailed instructions
// For help or support, visit our forum at http://powerupmysite.com/forum or write to us at support@powerupmysite.com
//********************************************************************************************************************

// ADCO MODS by Megan
var array_ads=new Array();
array_ads[0]=["", "images/ads/moved.jpg", "images/ads/moved_sm.jpg"];
var array_length = array_ads.length;
var array_pick = Math.floor(Math.random()*array_length);
var array_ad = array_ads[array_pick];

// STANDARD SETTINGS
var advertisement_url = array_ad[0]; // where you want your visitors to be delivered when they click your ad
var ad_image = array_ad[1]; // a JPG or SWF file that you want to use as your advertisement. 
var ad_image_small = array_ad[2]; // optional. Use if you have a second image for when the page curl is closed
var registrationKey = "701808830808764779"; // your v2 registration key. Use "demo" to sample on an unregistered domain. Use "808647757860226" for localhost if you are testing on your own machine and have a web server set up.

// ADDITIONAL OPTIONS
var target = ""; // enter "_new" if you want the links to open in a new browser window
var tabsize = 100; // how big do you want the page curl tab to be? You may enter any number from 50-100
var usereflection = true; // do you want the ad to be "reflected" onto the curled page? true/false. Also use "true" if you are using a custom reflection
var customreflection = ""; // use a .JPG or .SWF as your custom reflection. Leave blank to "reflect" your ad_image.
var hideadshadow = false; // do you want to hide the shadow which appears above your advertisement? true/false
var whichcorner = "upperright"; // options are "upperright" and "upperleft"
var pathtoswf = ""; // ADVANCED USE ONLY. The path to your Page Curl PRO v2 files (if not in the same directory as your .HTML file). See documentation



// _________________________________________________________________________________________________
// DO NOT MODIFY BELOW THIS LINE


function showBig(){
	document.getElementById('po_pcb').style.top = "0px";
	document.getElementById('po_pca').style.top = "-1000px";
}

function closeNow(){
	document.getElementById('po_pcb').style.top = "-1000px";
	document.getElementById('po_pca').style.top = "0px";
}

function badKey(reg){
	alert("Your Page Curl Pro v2 registration key does not appear to be valid. Please visit powerupmysite.com to obtain a valid registration key for this domain.");
}
 	
function enc(url){
	return 	url.replace(/&/g,"%26");
}

v_hideadshadow = hideadshadow ? 1 : 0;
v_usereflection = usereflection ? 1 : 0;

if (whichcorner == "upperleft"){
var a='<div style="top:0px;left:0px;position:absolute;width:150px;height:160px;z-index:1000000" name="po_pca" id="po_pca"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="150" height="160" id="po_pca_i" align="middle"><param name="flashvars" value="ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&registrationKey=' + registrationKey + '&pathtoswf=' + pathtoswf + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + pathtoswf + 'PageCurlProv2_Small_upperleft.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="' + pathtoswf + 'PageCurlProv2_Small_upperleft.swf" flashvars="ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&registrationKey=' + registrationKey + '&pathtoswf=' + pathtoswf + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '" quality="high" wmode="transparent" bgcolor="#ffffff" width="150" height="160" name="po_pca_i" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></div>';

var b='<div style="top:-1000px;left:0px;position:absolute;width:500px;height:500px;z-index:1000000" name="po_pcb" id="po_pcb"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="500" height="500" id="po_pcb_i" align="middle"><param name="allowScriptAccess" value="always" /><param name="swLiveConnect" value="true"><param name="flashvars" value="openOnStart=true&registrationKey=' + registrationKey + '&url=' + enc(advertisement_url) + '&ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&target=' + target + '&pathtoswf=' + pathtoswf + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '"><param name="movie" value="' + pathtoswf + 'PageCurlProv2_upperleft.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="' + pathtoswf + 'PageCurlProv2_upperleft.swf" quality="high" flashvars="openOnStart=true&registrationKey=' + registrationKey + '&url=' + enc(advertisement_url) + '&ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&target=' + target + '&pathtoswf=' + pathtoswf + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '" swLiveConnect="true" wmode="transparent" bgcolor="#ffffff" width="700" height="700" name="po_pcb_i" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></div>';
}else{
var a='<div style="top:0px;right:0px;position:absolute;width:150px;height:160px;z-index:1000000" name="po_pca" id="po_pca"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="150" height="160" id="po_pca_i" align="middle"><param name="flashvars" value="ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&registrationKey=' + registrationKey + '&pathtoswf=' + pathtoswf + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + pathtoswf + 'PageCurlProv2_Small.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="' + pathtoswf + 'PageCurlProv2_Small.swf" flashvars="ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&registrationKey=' + registrationKey + '&pathtoswf=' + pathtoswf + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '" quality="high" wmode="transparent" bgcolor="#ffffff" width="150" height="160" name="po_pca_i" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></div>';

var b='<div style="top:-1000px;right:0px;position:absolute;width:700px;height:700px;z-index:1000000" name="po_pcb" id="po_pcb"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="700" height="700" id="po_pcb_i" align="middle"><param name="allowScriptAccess" value="always" /><param name="swLiveConnect" value="true"><param name="flashvars" value="openOnStart=true&registrationKey=' + registrationKey + '&url=' + enc(advertisement_url) + '&ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&target=' + target + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '"><param name="movie" value="' + pathtoswf + 'PageCurlProv2.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="' + pathtoswf + 'PageCurlProv2.swf" quality="high" flashvars="openOnStart=true&registrationKey=' + registrationKey + '&url=' + enc(advertisement_url) + '&ad_image=' + ad_image + '&ad_image_small=' + ad_image_small + '&target=' + target + '&tabsize=' + tabsize + '&usereflection=' + v_usereflection + '&hideadshadow=' + v_hideadshadow + '&customreflection=' + customreflection + '" swLiveConnect="true" wmode="transparent" bgcolor="#ffffff" width="700" height="700" name="po_pcb_i" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></div>';
}
document.write(a);
document.write(b);
