//-- [START Namespace] --// (function phmg_placeBanners() { var OK, re, zidx = '999999', pid = 'g654276-ppc', ad_id = 'CRN_0030170012207510432', ed = 'l', blayer = 'top', lang = 'italian'; ad_id = ad_id.toLowerCase(); ed = ed.substr(0,1).toUpperCase(); lang = lang.toLowerCase(); re = /^([a-zA-Z]+\_\d{3})(\d{4})(\d{4})(\d{4})(\d{4})$/ OK = re.exec(ad_id); // Check if we have a banner name and banner dimesions for small and large. Dimesions are padded with 4 zeros. if(OK){ // Set parsed ad_id info (banner name, banner small width, banner small height, banner large width, banner large height) var ban_name = OK[1]; var ban_sm_w = OK[2]; var ban_sm_h = OK[3]; var ban_lg_w = OK[4]; var ban_lg_h = OK[5]; // Check for Banner's expanding direction var pos = 'right:0px;'; if(ed == 'R'){ pos = 'left:0px;'; } // Destination Page var page = new Array(); page[0] = 'http://adultfriendfinder.com/p/register.cgi?pid=' + pid; var img_dir = 'https://secureimage.securedataimages.com/banners/ffadult/crn/' + lang + '/'; // Number of ads var ads = 1; // Get Random ad IDX for array (page array) Mutiple ads. var ad_IDX = Math.round((ads -1) * Math.random()); var ad_url = escape(page[ad_IDX]); var banner = new Array(); banner[0] = { path : img_dir + ban_name + '.swf', width : ban_sm_w, height : ban_sm_h, top : '0', params : '&ad_id=' + ban_name + '&go_url=' + ad_url } banner[1] = { path : img_dir + ban_name + '_' + ed + '.swf', width : ban_lg_w, height : ban_lg_h, top : '-5000', params : '&ad_id=' + ban_name + '&go_url=' + ad_url } var start = ''; var end = ''; if(blayer != 'top'){ start = '
'; end = '
'; } // Build banners var html_code = ''; for(var i = 0; i < banner.length; i++){ html_code += start; html_code += '
'; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += '
'; html_code += end; } document.write(html_code); setTimeout('document.getElementById("' + ban_name + '1").style.top = "' + banner[1].top + '";',1000); }else{ alert('Not a valid "ad_id".'); } }()); //-- [END Namespace] --// //-- [START Flash calling functions] --// function phmg_displayCrnBanner_2(elmName){ document.getElementById(elmName + '1').style.top = '0px'; document.getElementById(elmName + '0').style.top = '-5000px'; } function phmg_displayCrnBanner_1(elmName){ document.getElementById(elmName + '0').style.top = '0px'; document.getElementById(elmName + '1').style.top = '-5000px'; } //-- [END Flash calling functions] --//