/*
var adPositions = new Array;

// Write out the placeholder <div> and add an entry to the adPositions array to indicate that this ad position is present on the current page
function writeAdDiv(name, ad_width, ad_height) {
    // Write the placeholder <div>
    document.write('<div class="banner" id="'+name+'" style="width:'+ad_width+'px; height:'+ad_height+'px; line-height:' + ad_height + 'px;">&nbsp;</div>');
    // Add an item to the adPositions array
    adPositions[name] = name;
}


function OpenX_moveAbove(sourceObj,targetObj) {
    var height = $(sourceObj).getStyle('height').toInt();
    var pos_left = $(targetObj).getPosition().x;
    var pos_top = $(targetObj).getPosition().y;
    
    if (height > 0) {$(targetObj).setStyle('height', height); }
    $(sourceObj).setStyle('left', pos_left);
    $(sourceObj).setStyle('top', pos_top);

}

function OpenX_positionDivs() {
    for (var zoneName in adPositions) {
        var offScreenZoneName = zoneName + '-Hidden';

        if ($(zoneName) && $(offScreenZoneName)) {
    		OpenX_moveAbove(offScreenZoneName, zoneName);
        }
    }
}
*/





function OpenX_creat(ads_id){
	var m3_u = (location.protocol=='https:'?'https://d1.openx.org/ajs.php':'http://d1.openx.org/ajs.php');
	var m3_r = Math.floor(Math.random()*99999999999);
	if (!document.MAX_used) document.MAX_used = ',';
	var ads_code = (m3_u);
	ads_code += ("?zoneid="+ads_id);
	ads_code += ('&amp;cb=' + m3_r);
	if (document.MAX_used != ',') ads_code += ("&amp;exclude=" + document.MAX_used);
	ads_code += (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
	ads_code += ("&amp;loc=" + escape(window.location));
	if (document.referrer) ads_code += ("&amp;referer=" + escape(document.referrer));
	if (document.context) ads_code += ("&context=" + escape(document.context));
	if (document.mmm_fo) ads_code += ("&amp;mmm_fo=1");
	return ads_code;
}


/*
function truc(){
	window.addEvent('resize', function(e) {
console.log(adPositions);

		adPositions.each(function(element){
		console.log(element);
			OpenX_moveAbove(element, element+'-Hidden');
		});
	});
}

window.addEvent('domready',function() {
	truc();		
});
*/
