// JavaScript Document

//Defining browser type
		browser_version1 = parseInt(navigator.appVersion);
		browser_type1 = navigator.appName;
		
		if (browser_type1 == "Microsoft Internet Explorer" && (browser_version1 >= 4)) {
		document.write("<link REL='stylesheet' HREF='_css/menu_ie.css' TYPE='text/css'>");
		} 
		
		else {
		document.write("<link REL='stylesheet' HREF='_css/menu_ns.css' TYPE='text/css'>");
		}
//------------------------


// Pop up window
		function winop() {
			windop = window.open("swf/structure.html","Structure","height=600,width=800");
		}
//------------------------


//Function for changing images in top news at the home page
		function changeimg(name,url){
			document.images[name].src=url;
			
		}
//------------------------


//Function for changing descriptions in top news at the home page
		function changedesc(name,text){
			/*if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4)) {
				document.all.name.innerHTML=text;
			}
			else if (browser_type == "Netscape" && (browser_version >= 4)) {*/
				document.getElementById(name).innerHTML=text;
			//}
		}
//------------------------


//Function for changing url form "more" link at the home page
		function changeurl(name,url){
			/*if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4)) {
				document.all.name.innerHTML=text;
			}
			else if (browser_type == "Netscape" && (browser_version >= 4)) {*/
				document.getElementById(name).href=url;
			//}
		}
//------------------------


//Changing background in the top video and photo galleries block at the home page
	function MClick_gal(){
		document.getElementById('media').style.backgroundImage='url(imgs/media_bl_bg.png)';
	}
	function MClick_video(){
		document.getElementById('media').style.backgroundImage='url(imgs/media_bl_bg1.jpg)';
	}
//------------------------


//Send page link to a friend function
	function mailpage()
	{
		mail_str = "mailto:?body=" + location.href;
		location.href = mail_str;
	}
//------------------------


//Horizontal menu showing function
/*sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);*/

//-------------------------


//Changing main four tabs background at home page
	function MClick_fr1(){
		document.getElementById('fr1').style.backgroundImage='url(imgs/pic1.jpg)';
		document.getElementById('fr2').style.backgroundImage='url(imgs/pic3.jpg)';
		document.getElementById('fr3').style.backgroundImage='url(imgs/tab_start.jpg)';
		document.getElementById('fr4').style.backgroundImage='url(imgs/tab_start.jpg)';
		document.getElementById('fr5').style.backgroundImage='url(imgs/tab_end.jpg)';
		document.getElementById('fr1_li').style.backgroundImage='url(imgs/pic5.jpg)';
		document.getElementById('fr2_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr3_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr4_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr1_a').style.color='#FFFFFF';
		document.getElementById('fr2_a').style.color='#000000';
		document.getElementById('fr3_a').style.color='#000000';
		document.getElementById('fr4_a').style.color='#000000';
		document.getElementById('main_tabs').style.backgroundImage='url(imgs/tabs_bg_live.jpg)';
	}
	
	function MClick_fr2(){
		document.getElementById('fr1').style.backgroundImage='url(imgs/tab_start_firts.jpg)';
		document.getElementById('fr2').style.backgroundImage='url(imgs/pic2.jpg)';
		document.getElementById('fr3').style.backgroundImage='url(imgs/pic3.jpg)';
		document.getElementById('fr4').style.backgroundImage='url(imgs/tab_start.jpg)';
		document.getElementById('fr5').style.backgroundImage='url(imgs/tab_end.jpg)';
		document.getElementById('fr1_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr2_li').style.backgroundImage='url(imgs/pic5.jpg)';
		document.getElementById('fr3_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr4_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr1_a').style.color='#000000';
		document.getElementById('fr2_a').style.color='#FFFFFF';
		document.getElementById('fr3_a').style.color='#000000';
		document.getElementById('fr4_a').style.color='#000000';
		document.getElementById('main_tabs').style.backgroundImage='url(imgs/tabs_bg.jpg)';
	}
	
	function MClick_fr3(){
		document.getElementById('fr1').style.backgroundImage='url(imgs/tab_start_firts.jpg)';
		document.getElementById('fr2').style.backgroundImage='url(imgs/tab_start.jpg)';
		document.getElementById('fr3').style.backgroundImage='url(imgs/pic2.jpg)';
		document.getElementById('fr4').style.backgroundImage='url(imgs/pic3.jpg)';
		document.getElementById('fr5').style.backgroundImage='url(imgs/tab_end.jpg)';
		document.getElementById('fr1_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr2_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr3_li').style.backgroundImage='url(imgs/pic5.jpg)';
		document.getElementById('fr4_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr1_a').style.color='#000000';
		document.getElementById('fr2_a').style.color='#000000';
		document.getElementById('fr3_a').style.color='#FFFFFF';
		document.getElementById('fr4_a').style.color='#000000';
		document.getElementById('main_tabs').style.backgroundImage='url(imgs/tabs_bg.jpg)';
	}
	
	function MClick_fr4(){
		document.getElementById('fr1').style.backgroundImage='url(imgs/tab_start_firts.jpg)';
		document.getElementById('fr2').style.backgroundImage='url(imgs/tab_start.jpg)';
		document.getElementById('fr3').style.backgroundImage='url(imgs/tab_start.jpg)';
		document.getElementById('fr4').style.backgroundImage='url(imgs/pic2.jpg)';
		document.getElementById('fr5').style.backgroundImage='url(imgs/pic4.jpg)';
		document.getElementById('fr1_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr2_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr3_li').style.backgroundImage='url(imgs/tab_bg.jpg)';
		document.getElementById('fr4_li').style.backgroundImage='url(imgs/pic5.jpg)';
		document.getElementById('fr1_a').style.color='#000000';
		document.getElementById('fr2_a').style.color='#000000';
		document.getElementById('fr3_a').style.color='#000000';
		document.getElementById('fr4_a').style.color='#FFFFFF';
		document.getElementById('main_tabs').style.backgroundImage='url(imgs/tabs_bg.jpg)';
	}
//------------------------

//Function for changing live links
		function changelink(name,text){
			/*if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4)) {
				document.all.name.innerHTML=text;
			}
			else if (browser_type == "Netscape" && (browser_version >= 4)) {*/
				document.getElementById(name).innerHTML=text;
			//}
		}
//------------------------

//Function for changing live links
		function redirect(lid,lang_id){
			window.location.href = "index.php?sec_id=1&lang_id="+lang_id+"&lid="+lid+"";
		}
//------------------------
// kote
$(function(){
	$('#fr2_a').click();
});

