/*
 $Header: //depot/Labs-JDN/DevelopmentPlan/019-mingle-710-double-click-distro-tags/monster_distro_publisher.js#4 $
 $DateTime: 2009/02/27 17:39:39 $
 $Author: gcarrette $
Note: for use on distro publisher sites only.
*/
function monster_distro_publisher_function()
{
    function q(v){return((v!=null)?'"' + v + '"' : '""');}
    function a(n,v){return(n+'='+q(v)+' ');}
    function o(e,l){return("<" + e + " " + l + ">");}
    function c(e){return("</" + e + ">");}
    var y = 'http://ads.monster.com/html.ng/';
    var affiliate = '84881aa5-fd10-465b-b9bd-beb98bdb1b9c';
    var width = 160;
    var height = 600;
    if (typeof(monster_distro_affiliate) != "undefined")
        affiliate = monster_distro_affiliate;
    if (typeof(monster_distro_ad_width) != "undefined")
        width = monster_distro_ad_width;
    if (typeof(monster_distro_ad_height) != "undefined")
        height = monster_distro_ad_height;
    var dl = escape(document.location);
    var amp = "&";
    var al = "site=distro" + amp +
             "affiliate=disus" + amp +
             "size=" + Math.abs(width) + "x" + Math.abs(height) + amp +
             "jdnaffiliate=" + affiliate + amp +
             "jdnlocation=" + dl;
    var x = 
    o('iframe', 
      a('title',"") + 
      a('name','monster_jdn_iframe') +
      a('width',Math.abs(width)) +
      a('height',Math.abs(height)) +
      a('marginwidth',0) +
      a('marginheight',0) +
      a('hspace',0) +
      a('vspace',0) +
      a('frameborder',0) +
      a('scrolling','no') +
      a('allowtransparency',true) +
      a('bordercolor','#000000') +
      a('src',y + al)) +
    c('iframe');
    jQuery('#monsterbox').replaceWith(x);
}
jQuery(document).ready(function ()
        {
        monster_distro_publisher_function();
        monster_distro_publisher_function = null;

        });

