var today = new Date();

today.setTime( today.getTime() );

today.setHours(today.getHours()+1);

today.setMinutes(0);

today.setSeconds(0);




function	utf8_encode  (string) 
{

	string = string.replace(/\r\n/g,"\n");
	var utftext = "";
	for (var n = 0; n < string.length; n++) 
	{
		var c = string.charCodeAt(n);
		if (c < 128) 
		{
			utftext += String.fromCharCode(c);
		}
		else if((c > 127) && (c < 2048)) 
		{
			utftext += String.fromCharCode((c >> 6) | 192);
			utftext += String.fromCharCode((c & 63) | 128);
		}
		else 
		{
			utftext += String.fromCharCode((c >> 12) | 224);
			utftext += String.fromCharCode(((c >> 6) & 63) | 128);
			utftext += String.fromCharCode((c & 63) | 128);
		}
	}
	return escape(utftext);
}


String.prototype.equalsIgnoreCase=myEqualsIgnoreCase;
String.prototype.equals=myEquals;

function myEquals(arg)
{
        return (this.toString()==arg.toString());
}
function myEqualsIgnoreCase(arg)
{               
        return (new String(this.toLowerCase())==(new String(arg)).toLowerCase());
}




function showSponsoredAds(show_ads_id,height,width)
{

	//var url="http://localhost/workspace/geo-city-5.1/show-sponsored-ads.php";
	
	var url="http://www.findsomethinggood.com/adserver/show-sponsored-ads.php";
	

	
	url=url+"?id="+show_ads_id;	
	url=url+"&hostname="+utf8_encode(window.location.href);



document.open();

//alert("<"+"script type=\"text/javascript\" src=\""+url+"\" language=\"javascript\"><"+"/script>");

document.write("<"+"iframe src=\""+url+"\" frameborder=0 height=\""+height+"\" width=\""+width+"\" ><"+"/iframe>");

document.close();


//alert(url);

}
