function CreateBookmarkLink() {
	title = "Sabahsabah.com : Bugün ne yapsak?"; 
	url = "http://www.sabahsabah.com";
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true;
	}
}

function setHomepage() {
	if (document.all) {
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.sabahsabah.com');
 	} else if (window.sidebar) {
		if(window.netscape) {
			try {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
			} catch(e) {
				alert("This action was aviod by your browser,if you want to enable,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");
			}
		}
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage','http://www.sabahsabah.com');
	}
}

function selectCity(cityID) {
	document.getElementById("topweather").innerHTML='Lütfen bekleyiniz...';
	document.getElementById("weathercitiesframe").style.display='none';
	
	$.post('includes/ajax.php?process=selectCity&cityID='+cityID, function(data){
		document.getElementById("topweather").innerHTML=data;
	});
}

function adultFree(theDiv) {
	theDiv.style.display='none';
	
	var today = new Date();
	today.setTime( today.getTime() );
	expires = 1 * 1000 * 60 * 60 * 24;
	var expires_date = new Date( today.getTime() + (expires) );
	
	document.cookie = 'adult=allow; expires=' + expires_date.toGMTString() +'; path=/';
}

function adultGo(theID) {
	var today = new Date();
	today.setTime( today.getTime() );
	expires = 365 * 1000 * 60 * 60 * 24;
	var expires_date = new Date( today.getTime() + (expires) );
	
	document.cookie = 'adult=allow; expires=' + expires_date.toGMTString() +'; path=/';
	self.location.href='cat.php?cid='+theID;
}


function preloadImages() {
	var tpl=arguments.length; var img = new Array();
	for(i=0; i<tpl; i++) { img[i] = new Image(); img[i].src=arguments[i]; }
}

function hov(im,sr) { im.src=sr; }



// ****************************** RUNNING FUNCTIONS ************************************
if (top.location != self.location) {
	top.location = self.location.href;
}

$(document).ready(function(){	
	preloadImages(	'/titanium/images/hd_blogger_over.png',
				  	'/titanium/images/hd_facebook_over.png',
				  	'/titanium/images/hd_flickr_over.png',
				  	'/titanium/images/hd_google_over.png',
				  	'/titanium/images/hd_myspace_over.png',
				  	'/titanium/images/hd_twitter_over.png',
				  	'/titanium/images/hd_vimeo_over.png',
				  	'/titanium/images/hd_yahoo_over.png',
				  	'/titanium/images/hd_home_over.png',
				  	'/titanium/images/hd_favorite_over.png',
				  	'/titanium/images/hd_recommend_over.png',
				  	'/titanium/images/hd_contact_over.png',
					'/titanium/images/btn_anasayfaya_don_over.png'
					);
});




