


/* Start Flash map use ---------------------------------------------------------------------*/

// get our flash movie object
var flashMovie;
function initFlashTalk() {
	if (document.getElementById) {
		flashMovie = document.getElementById("map");
	}
}

// for updating the text
function selectCountry(txt) {
	if (flashMovie.selectCountry) {
		flashMovie.selectCountry(txt);
	}
}

// for updating the text
function changeType(ind) {
	if (flashMovie) {
		flashMovie.setType(ind);
	}
}
//tabSwitcher('link1',1,'tabContent2')


/*for this function use link1, link2, link3... as ID for the element that must have the class="active"
use tabContent1, tabContent2, tabContent3... as ID for DIV that have to be visible or not*/
var thepreviouscid="tabContent1";
var thepreviouscid2="link1";

function tabSwitcher(ind,thebottom){
	//
	
	var mynode = "link"+ind;
	//
	document.getElementById(thepreviouscid).style.display="none";
	document.getElementById(thebottom).style.display="block";
	//
	
	var so = new SWFObject("swf/map_resp_00.swf", "map", "668", "380", "8", "#FFFFFF");
			
	so.addParam("allowScriptAccess", "always");
	so.addVariable("type", ind);
	so.write("tabContent1");
		
	thepreviouscid=thebottom;
	//
	targetElement2 = document.getElementById(thepreviouscid2);
	for (var k=0; k < targetElement2.attributes.length; k++) {
		if (targetElement2.attributes.item(k).nodeName == 'class') {
			if(targetElement2.attributes.item(k).nodeValue == 'lastActive'){
			targetElement2.attributes.item(k).nodeValue = "last";
			} else {
			targetElement2.attributes.item(k).nodeValue =  "";
			}
		}
	}
	//
	targetElement = document.getElementById(mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	thepreviouscid2=mynode;
	
}

function tabExpander5(mynode,cid){
	
	//alert("cid=" + cid + " and thepreviouscid=" + thepreviouscid)
	document.getElementById(thepreviouscid).style.display="none";
	document.getElementById(cid).style.display="block";
	thepreviouscid=cid;
	
	targetElement2 = document.getElementById(thepreviouscid2);
	for (var k=0; k < targetElement2.attributes.length; k++) {
		if (targetElement2.attributes.item(k).nodeName == 'class') {
			if(targetElement2.attributes.item(k).nodeValue == 'lastActive'){
			targetElement2.attributes.item(k).nodeValue = "last";
			} else {
			targetElement2.attributes.item(k).nodeValue =  "";
			}
		}
	}
	
	targetElement = document.getElementById("link"+mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	thepreviouscid2="link"+mynode;
}
/*function tabSwitcher(ind,thebottom){
	//
	var mynode = "link"+ind;
	//
	if (thebottom != thepreviouscid) {
		document.getElementById(thepreviouscid).style.display="none";
		document.getElementById(thebottom).style.display="block";
	}
	
	//
	if ((thebottom=="tabContent1")&&(thepreviouscid=="tabContent1")) {
		changeType(ind);
		alert("same flash");
		} else if (thebottom=="tabContent1") {
			var so = new SWFObject("swf/map_resp_00.swf", "map", "668", "380", "8", "##FFFFFF");
			so.addParam("allowScriptAccess", "always");
			so.addVariable("type", ind);
			so.write("tabContent1");
		}
	//
	thepreviouscid=thebottom;
	
	targetElement2 = document.getElementById(thepreviouscid2);
	for (var k=0; k < targetElement2.attributes.length; k++) {
		if (targetElement2.attributes.item(k).nodeName == 'class') {
			if(targetElement2.attributes.item(k).nodeValue == 'lastActive'){
			targetElement2.attributes.item(k).nodeValue = "last";
			} else {
			targetElement2.attributes.item(k).nodeValue =  "";
			}
		}
	}
	//
	targetElement = document.getElementById(mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	thepreviouscid2=mynode;
	
}
*/
/* End Flash map use ---------------------------------------------------------------------*/


function tabExpander(cid,mynode){
	
	//alert("cid=" + cid + " and thepreviouscid=" + thepreviouscid)
	document.getElementById(thepreviouscid).style.display="none";
	document.getElementById(cid).style.display="block";
	thepreviouscid=cid;
	
	targetElement2 = document.getElementById(thepreviouscid2);
	for (var k=0; k < targetElement2.attributes.length; k++) {
		if (targetElement2.attributes.item(k).nodeName == 'class') {
			if(targetElement2.attributes.item(k).nodeValue == 'lastActive'){
			targetElement2.attributes.item(k).nodeValue = "last";
			} else {
			targetElement2.attributes.item(k).nodeValue =  "";
			}
		}
	}
	
	targetElement = document.getElementById(mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	thepreviouscid2=mynode;
}


/*for this function use link1, link2, link3... as ID for the element that must have the class="active"
use tabContent1, tabContent2, tabContent3... as ID for DIV that have to be visible or not*/
var programprevid="inbotContent1";
var programprevid2="link1";
function tabExpanderBis(cid,mynode){
	
	//alert("cid=" + cid + " and thepreviouscid=" + thepreviouscid)
	document.getElementById(programprevid).style.display="none";
	document.getElementById(cid).style.display="block";
	programprevid=cid;
	
	targetElement2 = document.getElementById(programprevid2);
	for (var k=0; k < targetElement2.attributes.length; k++) {
		if (targetElement2.attributes.item(k).nodeName == 'class') {
			if(targetElement2.attributes.item(k).nodeValue == 'lastActive'){
			targetElement2.attributes.item(k).nodeValue = "last";
			} else {
			targetElement2.attributes.item(k).nodeValue =  "";
			}
		}
	}
	
	targetElement = document.getElementById(mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	programprevid2=mynode;
}

/*for this function use country1, country2, country3... as ID for the element that must have the class="active"
use tabList1, tabList2, tabList3... as ID for DIV that have to be visible or not*/
var thepreviouscountry="";
var thepreviouscountry2="";
function tabExpander2(cid,mynode){
	
	//alert("cid=" + cid + " and thepreviouscountry=" + thepreviouscountry)
	if(thepreviouscountry != "") document.getElementById(thepreviouscountry).style.display="none";
	document.getElementById(cid).style.display="block";
	thepreviouscountry=cid;
	
	
	if(thepreviouscountry2 != "") {
		targetElement = document.getElementById(thepreviouscountry2);
		for (var k=0; k < targetElement.attributes.length; k++) {
			if (targetElement.attributes.item(k).nodeName == 'class') {
				if (targetElement.attributes.item(k).nodeValue=='lastActive'){
			  		targetElement.attributes.item(k).nodeValue = "last";
				} else {
					targetElement.attributes.item(k).nodeValue =  "";
				}
			}
		}
	}
	
	
	targetElement = document.getElementById(mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	thepreviouscountry2=mynode;
	//
	selectCountry(cid);
	//
	
	thislocation = window.location.href;
	boxstr = '#boxes';
	if (thislocation.indexOf(boxstr) != -1){ this.location = thislocation; }
	else{ this.location = thislocation + boxstr; }
}


/*for this function use link1, link2, link3... as ID for the element that must have the class="active"
use tabContent1, tabContent2, tabContent3... as ID for DIV that have to be visible or not*/
var countryBottom="tabContent1";
var countryTab="link1";
function tabExpander3(cid,mynode){
	targetElementOldBottom = document.getElementById(countryBottom);
	targetElementNewBottom = document.getElementById(cid);
	for (var k=0; k < targetElementOldBottom.attributes.length; k++) {
		if (targetElementOldBottom.attributes.item(k).nodeName == 'class') {
			targetElementOldBottom.attributes.item(k).nodeValue = "bottomOff";
		}
	}
	for (var k=0; k < targetElementNewBottom.attributes.length; k++) {
		if (targetElementNewBottom.attributes.item(k).nodeName == 'class') {
			targetElementNewBottom.attributes.item(k).nodeValue = "bottomOn";
		}
	}
	countryBottom=cid;
	
	targetElement2 = document.getElementById(countryTab);
	for (var k=0; k < targetElement2.attributes.length; k++) {
		if (targetElement2.attributes.item(k).nodeName == 'class') {
			if(targetElement2.attributes.item(k).nodeValue == 'lastActive'){
			targetElement2.attributes.item(k).nodeValue = "last";
			} else {
			targetElement2.attributes.item(k).nodeValue =  "";
			}
		}
	}
	
	targetElement = document.getElementById(mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	countryTab=mynode;
}

function tabExpander4(cid,mynode){
	targetElementOldBottom = document.getElementById(countryBottom);
	targetElementNewBottom = document.getElementById(cid);
	for (var k=0; k < targetElementOldBottom.attributes.length; k++) {
		if (targetElementOldBottom.attributes.item(k).nodeName == 'style') {
			targetElementOldBottom.attributes.item(k).nodeValue = "position:absolute; top:35px; z-index:10; height:380px; width:668px; display:block; background:#fff;";
		}
	}
	for (var k=0; k < targetElementNewBottom.attributes.length; k++) {
		if (targetElementNewBottom.attributes.item(k).nodeName == 'style') {
			targetElementNewBottom.attributes.item(k).nodeValue = "position:absolute; top:35px; z-index:100; height:380px; width:668px; display:block; background:#fff;";
		}
	}
	countryBottom=cid;
	
	targetElement2 = document.getElementById(countryTab);
	for (var k=0; k < targetElement2.attributes.length; k++) {
		if (targetElement2.attributes.item(k).nodeName == 'class') {
			if(targetElement2.attributes.item(k).nodeValue == 'lastActive'){
			targetElement2.attributes.item(k).nodeValue = "last";
			} else {
			targetElement2.attributes.item(k).nodeValue =  "";
			}
		}
	}
	
	targetElement = document.getElementById(mynode);
	for (var k=0; k < targetElement.attributes.length; k++) {
		if (targetElement.attributes.item(k).nodeName == 'class') {
			if (targetElement.attributes.item(k).nodeValue=='last'){
		  		targetElement.attributes.item(k).nodeValue = "lastActive";
			} else {
				targetElement.attributes.item(k).nodeValue =  "active";
			}
		}
	}
	countryTab=mynode;
}



	/*TOOL TO USE THE TOOLTIP*/
	
/*		var DH = 0;var an = 0;var al = 0;var ai = 0;if (document.getElementById) {ai = 1; DH = 1;}else {if (document.all) {al = 1; DH = 1;} else { browserVersion = parseInt(navigator.appVersion); if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {an = 1; DH = 1;}}} function fd(oi, wS) {if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); if (al) return wS ? document.all[oi].style: document.all[oi]; if (an) return document.layers[oi];}
		function pw() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}
		function mouseX(evt) {if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft); else return null;}
		function mouseY(evt) {if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null;}
		function popUp(evt,oi) { if (DH) {var wp = pw(); ds = fd(oi,1); dm = fd(oi,0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else {tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; if (!an) {lv += 'px';tv += 'px';} ds.left = lv; ds.top = tv; ds.visibility = "visible";}}}

*/

	/*TOOL FOR INCREASE/DECREASE FONT SIZE*/
	var tags = new Array('div','td','tr','p','b','span','table','strong','emphasis','a','h1','h2','h3','pre','sub','sup','i','th','cp','ul','ol','li','dt','dd');
	var pixelArray = new Array('10','12','14','18','24','30','40');
	var emArray = new Array('0.7','0.9','1.0','1.5','2.0','2.5','3');
	var initSize = 2;
	 function fontSizer(inc,unit) {
	if (!document.getElementById)
	 return;
	 var size = initSize;
	 size += inc;
	 if (size < 0 ) {
	 size = 0;
	}
	if (size > 6 ) {
	size = 6;
	 }
	 initSize = size;
	 getBody = document.getElementsByTagName('body')[0];
	 for (i = 0 ; i < tags.length ; i++ ) {
	 getallTags = getBody.getElementsByTagName(tags[i]);
	 for (k = 0 ; k < getallTags.length ; k++)
	 getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
	 }
	}
	
	


		