
//********************************************************************************************************************
// PowerUpMySite.com Ad Curl Pro
//
// 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
//********************************************************************************************************************

// STANDARD SETTINGS
var div_container = "d_header_bundle_ad"; // The ID of the DIV object in your HTML page where you want your Ad Curl placed in. See sample HTML file for an example.
var width = 180; // The width of your ad, in pixels
var height = 150; // The height of your ad, in pixels
var corner = "NE"; // The corner of the ad you wish to peel. Options are "NE" for NorthEast, "SE", "NW", and "SW"
var tabsize = 55; // How big do you want the tab to be? Typical settings are 40-120
var mode = "rollovertab"; // Values are:
	// "rollover": Peel back the ad when the user moves their mouse over any part of the ad
	// "rollovertab": Peel back the ad when the user moves their mouse over the ad tab
	// "click": Peel back the ad when the user clicks any part of the ad
	// "clicktab": Peel back the ad when the user clicks on the ad tab
	// This can be used in conjunction with "timer". For example, if this is set to "rollover" and the timer is set to 5, the ad will peel when the user moves their mouse over the ad, or if the user doesn't move their mouse over the ad within 5 seconds.
var timer = 0; // (in seconds) If you want the curl to peel back automatically if the user hasn't interacted with it in a set period of time, enter a value greater than 0. This can be used in conjunction with "mode"
var fade = "no"; // Do you want the ad to fade out as it peels back?
var breeze = "yes"; // Do you want the breeze effect on the tab before it peels back?
var top_ad = "http://powerupmysite.com/bundle/images/header_bundle_ad_top.jpg"; // The source of the ad that appears on the top (JPG or SWF)
var top_ad_backing = ""; // Optional. By default, the back of the top ad (when it peels back) displays the reverse of the top_ad. If you like, you can use your own backing. (JPG or SWF)
var bottom_ad_small = ""; // Optional. The source (JPG or SWF) of the file you wish to appear below the tab, before it is peeled back. NOTE: THIS DISAPPEARS AFTER THE CURL PEELS BACK. If you wish to only use one ad underneath the curl, leave this setting blank and use "bottom_ad"
var bottom_ad = "http://powerupmysite.com/bundle/images/header_bundle_ad_bottom.jpg"; // Optional. The source (JPG or SWF) of the file that appears below the page curl. 
var bottom_ad_url = "http://powerupmysite.com/bundle"; // If you want your bottom_ad to be click-able, put the URL to deliver the user to here.


// ADDITIONAL/ADVANCED OPTIONS
//var adcurlid = 1; // If using mulitple ads on a single HTML page, you need to give each ad a unique id number.
var speed = 9; // How fast do you want the peeling animation to go? Typical settings are 5-10
var breeze_speed = .04; // Larger tab sizes might look better with a slower breeze speed, like .02. Smaller tab sizes look better with a faster breeze speed, like .1. You can play with this variable to customize the effect.
var adhesive_color = "ffffff"; // There is "adhesive" on the back of the ad that peels back. You can customize the color of the adhesive by changing this value to a HEX color. Standard setting is "ffffff", for white.
var adhesive_strength = 65; // 1-100. You can also customize the strength of the adhesive. More strength means less transparency, and the color will appear stronger on the back-side of the top ad.
var shadow_strength = 40; // 1-100. There is a shadow on the ad that peels back. You can customize the strength or intensity of that shadow to achieve a desired look.
var rollover_protection = "no"; // yes/no. If you have set "mode" to "rollover" or "rollovertab", and the user has their mouse over the ad before it tabs (when your web page first loads), the ad will not peel until the user moves their mouse off of the ad, and back onto the ad if this is set to "yes". Otherwise, the ad will peel when the user moves their mouse on the ad right away.
var pathtoswf = "http://powerupmysite.com/components/adcurlpro/swf/"; // If you are keeping your AdCurlPro.swf file in a directory other than where your HTML file is located, you'll want to set this to the absolute path to your file. For example, "http://mysite.com/swf/"



// _________________________________________________________________________________________________
// PLEASE DO NOT MODIFY BELOW THIS LINE


var parent = div_container;
var newdiv = document.createElement('div');
adcurlid++;
var acid=adcurlid;
newdiv.setAttribute("id","dpci_"+acid);
newdiv.style.top = 0;
newdiv.style.left = 0;
newdiv.style.position = "absolute";
var flashvars = "adheight="+height+"&adwidth="+width+"&corner="+corner+"&fade="+fade+"&breeze="+breeze+"&speed="+speed+"&adhesive_color="+adhesive_color+"&adhesive_strength="+adhesive_strength+"&top_ad="+top_ad+"&top_ad_backing="+top_ad_backing+"&bottom_ad="+bottom_ad+"&bottom_ad_small="+bottom_ad_small+"&timer="+timer+"&mode="+mode+"&tabsize="+tabsize+"&shadow_strength="+shadow_strength+"&bottom_ad_url="+bottom_ad_url+"&breeze_speed="+breeze_speed+"&bottom_ad_small="+bottom_ad_small+"&rollover_protection="+rollover_protection+"&prt=dpci_"+acid;
var objstyle = "top:0px;left:0px;padding:0px;margin:0px;";
var a='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="po_pcpid_i_'+acid+'" style="'+objstyle+'"><param name="flashvars" value="'+flashvars+'"><param name="allowScriptAccess" value="always" /><param name="movie" value="'+pathtoswf+'AdCurl.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="'+pathtoswf+'AdCurl.swf" flashvars="'+flashvars+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="'+width+'" height="'+height+'" allowScriptAccess="always"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="'+objstyle+'"/></object>';
newdiv.innerHTML = a;
document.getElementById(parent).appendChild(newdiv);


