﻿
function request( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

$(document).ready(function(){	            
    var currentADID = $("#currentADID").attr("value");
    if (currentADID != '') {
        
        $.ajax({
            type: "GET",
            url: "/popUpAdMain/popupadhandler.ashx",
            data: { adid: currentADID },                
            success: function(html){
                if (html != 'false') {                    
                    $('body').append(html);                      
                }
            }
        });
    }            
});
