	function confirmLink(theLink, theSqlQuery)
	{
		var is_confirmed = confirm(theSqlQuery);
		if (is_confirmed) 
			theLink.href += '&is_js_confirmed=1';
		return is_confirmed;
	}

	function exWin(website) 
	{
		var winwidth = screen.availWidth;
		var winheight = screen.availHeight;

		if (document.all) 
		{
			var sizer = window.open("","",'left=0,top=0,width='+winwidth+',height='+winheight+',scrollbars=yes,fullscreen=yes');
			sizer.location = website;
		} 
		else 
		{
			window.open(website,"fotowindow",'left=0,top=0,width='+winwidth+',height='+winheight+',scrollbars=yes,fullscreen=yes');
//			window.open(website,'fotowindow','width=winwidth,height=winheight,menubar=no,status=no,location=no,scrollbars=auto,fullscreen=yes,directories=no,resizable=yes');
		}
	}

	function confirml(text,l1,l2,l3,l4,l5)
	{
		var is_confirmed = confirm(text);
		if (is_confirmed) 
			StCh(l1,l2,l3,l4,l5);
		return is_confirmed;
	}

	function jumpScroll() 
	{
	   	window.scroll(0,150); // horizontal and vertical scroll targets
	}


	function ch_change( obj1, obj2 )
	{

		var elmm = document.getElementById(obj1).style.display;
		if(elmm=='none')
		{
			document.getElementById(obj1).style.display = "block";
			if(obj1!=obj2)
				document.getElementById(obj2).style.display = "none";
		}
		else
		{
			document.getElementById(obj1).style.display = "none";
			if(obj1!=obj2)
				document.getElementById(obj2).style.display = "block";
		}
	}

	function new_wind(adrese, w, h)
	{
		width=screen.width;
		height=screen.height;
		l=(width-w)/2;
		t=(height-h)/2-50;

		window.open(adrese, "_blank", "toolbar=no, location=no, left="+l+", top="+t+", directories=no, status=no, menubar=no, scrollbars=no, resizable=0, fullscreen=no, width="+w+", height="+h);
	}

	function new_winda(adrese, w, h)
	{
		width=screen.width;
		height=screen.height;
		l=(width-w)/2;
		t=(height-h)/2-50;
		window.open(adrese, "_blank", "toolbar=ns, location=no, left="+l+", top="+t+", directories=no, status=yes, menubar=no, scrollbars=yes, resizable=1, fullscreen=no, width="+w+", height="+h);
	}

	function new_winds(adrese, w, h)
	{
		width=screen.width;
		height=screen.height;
		l=(width-w)/2;
		t=(height-h)/2-50;
		window.open(adrese, "_blank", "toolbar=ns, location=no, left=1, top=1, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=1, fullscreen=no, width="+w+", height="+h);
	}

	function alertSize() 
	{
		var myWidth = 0, myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
//  window.alert( 'Width = ' + myWidth );
//  window.alert( 'Height = ' + myHeight );
		return ((myWidth/2)-250);
	}

	function alertSize_h() 
	{
		var myWidth = 0, myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' )
		{
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		}
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		{
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		{
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
		return ((myHeight/2)-150);
	}

	function smslive()
	{
		StCh(false,'set=reffriends','smsmes',true,false);
		setTimeout("smslive();", 60000); 
	}


	function controlPlayer(func,param)
	{
		thisMovie("mp3player").jsControl(func,param);
	}


	function thisMovie(movieName)
	{
	if (navigator.appName.indexOf("Microsoft") != -1)
		{
	        	return window[movieName]
		}
		else 
		{
		        return document[movieName]
		}
	}

	function chtheme(upt,downt)
	{
		if(document.getElementById('uptheme').src!=upt && document.getElementById('uptheme').src!=downt)
		{
			var uptheme=new Image(1000, 150);
			var downtheme=new Image(1000, 150);
			uptheme.src=upt;
			downtheme.src=downt;
			document.getElementById('uptheme').src=uptheme.src;
			document.getElementById('downtheme').src=downtheme.src;
		}
	}
