
function funtonia_handle_affilate() 
{
	var w = window;
	var width;
    	var height;
	var funtonia_afftt = document.title.toLowerCase();
	
	if (w.funtonia_affid) {
		var prot = w.location.protocol.toLowerCase();
    	if ('http:' != prot && 'https:' != prot) {
      		prot = 'http:';
    	}
		var url = prot + "//www.funtonia.com/promo/meta_title.asp?affid="+funtonia_affid;
		if (w.funtonia_ptool) {
      		url = url + "&ptool=" + funtonia_ptool;
			switch(funtonia_ptool){
				case 10 :
					width = 300;
					height = 15;
					break;
				case 11 :
					width = 728;
					height = 90;
					break;
				case 12 :
					width = 600;
					height = 400;
					break;
				case 13 :
					width = 400;
					height = 400;
					break;
				case 15 :
					width = 300;
					height = 250;
					break;
				case 17 :
					width = 468;
					height = 60;
					break;
				default:
					width = "";
					height = "";
			}
    	}
		if (funtonia_afftt) {
      		url = url + "&artname=" + escape(funtonia_afftt);
    	}
	}
	
	document.write('<ifr' + 'ame' +
             		' src="' + url + '"' +      
		     		' width="' + width + '"' +
		     		' height="' + height + '"' +
                    ' marginwidth="0"' +
                    ' marginheight="0"' +
					' frameborder="0"' +
                    ' vspace="0"' +
                    ' hspace="0"' +
                    ' scrolling="no">');
    document.write('</ifr' + 'ame>');

    w.funtonia_affid = null;
    w.funtonia_ptool = null;
    w.funtonia_afftt = null;
}

funtonia_handle_affilate();

