// start of global variables
// countrylist with rollovereffects to reset them
var countrylist = new  Array("aegypten","argentinien","australien","belgien","bolivien","bosnien-herzegowina","brasilien","bulgarien","chile","china","costa_rica","daenemark","deutschland","dominikanische_republik","ecuador","estland","finnland","frankreich","ghana","griechenland","guatemala","grossbritanien","honduras","indien","indonesien","irland","island","italien","japan","kanada","kenia", "kolumbien","kroatien","lettland","litauen","malaysia","mexiko","nepal","neuseeland","niederlande","norwegen","panama","paraguay","peru","philippinen","polen","portugal","rumaenien","russland","schweden","schweiz","serbien","slowakei","slowenien","spanien","suedafrika","suedkorea","thailand","tschechische_republik","tunesien","tuerkei","ungarn","usa","venezuela","vietnam","zypern");

// start of crossbrowser functions
function DynaObject(div_id){ 
// generates a browser specific expression to access an object of the document
	if (!div_id || div_id.length==0) 
    	div_obj = document;
	else 
    	if (document.getElementById) 
      		div_obj = document; 
		 else 
			if (document.layers) 
          		div_obj = eval("document."+div_id+".document");
       		else 
				if (document.all) 
          			div_obj = eval("document.all."+div_id+".document");
      
    	return div_obj;
}     

function DynaStyle(div_id) {
// generates a browser specific expression to access the styles of an object
	// alert(div_id)
		if (!div_id || div_id.length==0) {
    	if (document.getElementById) {
        	div_obj = document.style;
       } else 
	   	if (document.layers) {
      		div_obj = document;
       	} else 
			if (document.all) {
           		div_obj = document.all.style;
       		}
    } else    
    	if (document.getElementById) {
        	div_obj = document.getElementById(div_id).style;
       	} else 
			if (document.layers) {
          		div_obj = eval("document."+div_id);
       		} else 
				if (document.all) {
          			div_obj = eval("document.all."+div_id+".style");
       			}
    return div_obj;
}

function DynaPos(div_id,pleft,ptop) {
// generates a a browser specific expression to change the "left" and "top" position of a "layer"
	if (document.all) {
		DynaStyle(div_id).posLeft=pleft;
		DynaStyle(div_id).posTop=ptop;
	} else {
		DynaStyle(div_id).left=pleft;
		DynaStyle(div_id).top=ptop;
	}	

}

function restart_newsticker() {
	// when mousebutton is clicked on main menu topic
	i=-1;
	curr="";
	
}

function ci(id) {
	// show container with worldmap rollover
	var sid=id+"_o";
	if (document.getElementById(sid)) { // is there a rollover container?
		DynaStyle(sid).visibility = "visible"; //then show rollover
	} 
}

function ri() {
	// hide all containers with worldmap rollover and use countrylist array to catch them all
	var i=0;
	for (i = 0; i < countrylist.length; i++) {
		sid=countrylist[i]+"_o";
		if (document.getElementById(sid)) { // is there a rollover container?
		   DynaStyle(sid).visibility = "hidden";
		}
	}
}

/*
function popup(id) { //open new window with country information and resize it
	ri(id);
	var wwidth	= 620; //width of new window
	var wheight	= 700; //height of new window
	var toppos	= 0; // position from top
	var leftpos = (screen.availWidth-wwidth-20)/2; // pos.from left, in the middle here we go
	parameter	= ('width='+wwidth+',height='+wheight+',left='+leftpos+',top='+toppos);
	parameter	= parameter+(',directories=0,location=0,menubar=0,personalbar=0,toolbar=0,status=0,scrollbars=1,resizable=1');
	if (window.name=="country") { //if window exists close it
		country.close();
	}
	country=window.open(id,'Länderinformationsseite',parameter);
    country.focus();
}



function laenderfenster (dummy,country) {

	var params = 'scrollbars=yes,width=860,left='+(screen.availWidth/2-410)+'';
	var url = 'http://afsweb.de/relaunch/joomla15/laender/'+country.toLowerCase()+'.html'; 
	new_win = window.open(url,country,params);
	new_win.focus();
	//return false;"

}
*/


