// JavaScript Document
var mysub_img;
var g_main="";
function getURL(url)
{
	var nohttp = url.split('//')[1];
	var result = nohttp.split('/')[1];
	var lresult=result.split('.')[0];
	return lresult;
}

function swap(objId,style){
	if (objId!=mysub_img){
		document.getElementById(objId).style.fontWeight=style;
		
	}
}

function change_img(id, img)
{
	img="tl_files/ciga/body_images/" + img;
	document.getElementById(id).style.backgroundImage="url(" + img + ")";
	//document.getElementById(id).style.padding-top="5px";
	//document.getElementById(id).style.padding-left="18px";
	//document.getElementById(id).style.color="#FFFFFF"
}

function ChangeActive() {
	void(0);	
	var url=window.location.href;		
	var main="";
	links = document.getElementsByTagName('a');
	for(var i = 0; i<links.length; i++) {
		main=getURL(url).split("/",2)[0];
		if (main==""){
			document.getElementById("home").style.color='#000';	
			document.getElementById("home").style.backgroundColor='#AEA296';	
		}  else
		if (links[i].id==main){
			document.getElementById(main).style.color='#000';	
			document.getElementById(main).style.backgroundColor='#AEA296';	
		}             		
	}

}

window.onload=ChangeActive;
