	// configuratore di iframe
	
	//**********************************shows the URL of the site
	var urlsite=''+window.location;
	var j=0;
	var count=1;
	while(j<=urlsite.length && count<=3){
		if(urlsite.charAt(j)=='/' || urlsite.charAt(j)==''){
			count++;
		}
		j++;
	}
	if(urlsite.charAt(j-1)!=''){
		urlsite=urlsite.substring(0,j);
	}else{
		urlsite=urlsite.substring(0,j-1)+'/';
	}
	urlsite=escape(urlsite);
	for(var i=0;i<urlsite.length;i++){
		urlsite=urlsite.replace('/',"%2F")
	}
	//********************************** END shows the URL of the site

	//parameter for the page
	var id='theadverter_iframe';
	var scrolling='no';
	var	marginwidth='0';
	var marginheight='0';
	var	frameborder='0';
	var banner_g='adv_g_125x125';
	//var base_path='http://127.0.0.1/theadverter';
	var base_path='http://www.adsdicted.com';
	var src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
	

	//************************** show the ads with the correct size ******************
		switch(banner_type)
		{
		case 'adv_text_468x60':
			iframe_width='468';
			iframe_height='60';
			banner_g='adv_g_234x60';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break    
		case 'adv_text_120x240':
			iframe_width='120';
			iframe_height='240';
			banner_g='adv_g_125x125';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break    
		case 'adv_text_234x60':
			iframe_width='234';
			iframe_height='60';
			banner_g='adv_g_234x60';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break    
		case 'adv_text_125x125':
			iframe_width='125';
			iframe_height='125';
			banner_g='adv_g_125x125';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break    
		case 'adv_text_300x250':
			iframe_width='300';
			iframe_height='250';
			banner_g='adv_g_234x60';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break    
		case 'adv_text_728x90':
			iframe_width='728';
			iframe_height='90';
			banner_g='adv_g_234x60';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break 
		case 'adv_text_120x600':
			iframe_width='120';
			iframe_height='600';
			banner_g='adv_g_125x125';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break    
		case 'adv_text_160x600':
			iframe_width='160';
			iframe_height='600';
			banner_g='adv_g_125x125';
			src=base_path+'/advertise/advertise.php?user='+user_id+'&banner='+banner_type+'&banner_g='+banner_g+'&banner_name='+banner_name+'&txtcolor='+text_color+'&txtbackground='+text_background+'&linkcolor='+link_color+'&urlsito='+urlsite;
		  break    
		default:
			iframe_width='100%';
			iframe_height='100%';
			src=base_path;
			scrolling='yes';
			marginwidth='5';
			marginheight='5';
			frameborder='1';
		}	
	//************************** END show the ads with the correct size ******************

	

	//********************this will give the parameter to the page**************************		
	document.write('<iframe id='+id+' src='+src+' marginwidth='+marginwidth+' marginheight='+marginheight+' frameborder='+frameborder+' scrolling='+scrolling+' height='+iframe_height+' width='+iframe_width+'></iframe>');
