﻿
var fontSize = 10;

function FontSizeSet() 
	{ 
        var el, n = 1; 
        while (el = document.getElementById('pagetext' + n++)) 
        el.style.fontSize = fontSize + 'pt'; 
        return false; 
	} 

function SetFontLarger() 
	{ 
		if (fontSize < 14) 
		            fontSize++; 
		return FontSizeSet(); 
	} 

function SetFontSmaller() 
	{ 
		if (fontSize > 7) 
		            fontSize--; 
		return FontSizeSet(); 
	} 

mmGet_Cookie(name); 



var mmDaysDuration=10; 
var mmtoday = new Date(); 
var mmexpires = new Date(mmtoday.getTime() + (mmDaysDuration * 86400000)); 
var mmstart=null; 
var mmlen=null; 
var mmend=null; 

function mmGet_Cookie(name)
	{ 
	var mmstart = document.cookie.indexOf(name+"="); 
	var mmlen = mmstart+name.length+1; 
		if ((!mmstart) && (name != document.cookie.substring(0,name.length))) return null; 
		if (mmstart == -1) return null; 
		var mmend = document.cookie.indexOf(";",mmlen); 
		if (mmend == -1) mmend = document.cookie.length; 
		return unescape(document.cookie.substring(mmlen,mmend)); 
	}

function mmSet_Cookie(name,value,expires,path,domain,secure)
	{ 
		document.cookie = name + "=" +escape(value) + 
		( (expires) ? ";expires=" + expires.toGMTString() : "")+ 
		(  ";path=/" ) + 
		( (domain) ? ";domain=" + domain : "") + 
		( (secure) ? ";secure" : ""); 
	}

function getFont()
	{ 
		if (mmGet_Cookie('MyName')){ 
		  fontSize=mmGet_Cookie('MyName'); 
		  FontSizeSet(); 
		} 
	}

var favoriteurl="http://www.rooznamak.ir"
var favoritetitle="rooznamak.ir بهترين و پربيننده ترين سايت فارسي"

function addtoFavorites()
	{
		if (document.all)
		window.external.AddFavorite(favoriteurl,favoritetitle)
	}



