var NPframe = function(fName, fSrc) {
    this.action = "";
    this.create = function(child, parent) {
    	if(location.search.substring(1)){
	    var qs=location.search.substring(1);
	    var qspairs=new Array();
	    qspairs=qs.split('&');
	    for(i=0;i<qspairs.length;i++){
	        var pair=new Array();
	        pair = qspairs[i].split('=');
	        //if(pair[0]=='promo'){
	        if(pair[0]=='utm_source'){
	            	if(pair[1]){
		            	this.el = document.createElement("IFRAME");		            	
		            	//alert("http://link.neopostinc.com/servjs.asp?promo="+pair[1]);
			        this.el.setAttribute("src", "http://link.neopostinc.com/servjs.asp?promo="+pair[1]);
				this.el.setAttribute("style","display:none;");
				
				try{
				this.el.style['display']='none';
				this.el.style['display'].value='none';
			}catch(E){}
			
			        //if (fName) {
			            this.el.setAttribute("name", "leadtracking");
			            this.el.setAttribute("id", "leadtracking");
		        	//}
        
	                //document.getElementById('promo').value=pair[1];
	                //document.write(unescape('%3Ciframe src="http://www.neopostinc.com/servjs.asp?promo='+pair[1]+'" frameborder="0"%3E%3C/iframe%3E'));
	            }
	        }
	    }
	}

        
	
    };
    this.init = function() {
		try {
			var el = document.body;
			
			this.create(el, parent);
			el.appendChild(this.el);
		}
		catch(e){}
    }
    this.init();
}

try {
    Ext.onReady(function(){
        var np_frame = new NPframe();
    });
}
catch (ex) {
    var np_frame = new NPframe();
}


