var ns4up; 	
var ie4up;
var mozup;

var w;
var h;
function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ 
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
 // window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  w = myWidth ;
  h = myHeight ;
}

//Browser Sniffer	
function browserSniffer(){
	ns4up = (document.layers) ? 1 : 0;
	ie4up = (document.all) ? 1 : 0;
	mozup = (!document.all && document.getElementById) ? 1 : 0;	
		
}
/** ---start------------------------------ participants ---------------------------------------- **/ 
var wmtt;
var participants;

var lastCountry;
var lastTag = " ";
var topValue;

function show_coords( event)
{
alertSize();
myX = 0;
myY = 0;
if ( w > 1024 ){
temp = (w-1024)/2;
myX = Math.round(temp) + 170;
} else {
 	myX = 170;
}
if ( w > 752 ){
temp = (h-752)/2;
myY = Math.round(temp) + 170;
} else {
 	myY = 170;
}

//Browser Sniffer
	//var ns4up = (Main.ContentHelp.document.layers) ? 1 : 0;
//	var ie4up = (Main.ContentHelp.document.all) ? 1 : 0;
	//var mozup = (!Main.ContentHelp.document.all && Main.ContentHelp.document.getElementById) ? 1 : 0;
	browserSniffer();
	if ( (ns4up) || (ie4up) || (mozup)) {
		if (ns4up) {
			wmtt = document.overDiv.document;
			participants = document.participants.document;
		}
		if (ie4up) {
			wmtt = document.all.overDiv;
			participants = document.all.participants;
	}
		if (mozup) {
			wmtt = document.getElementById("overDiv");
			//Main.main.ContentHelp.document.onmousemove = mouseMove
			participants = document.getElementById("participants");
	}
		if (ns4up) 
			document.captureEvents(Event.MOUSEMOVE)
	}
	
	if (ns4up || mozup) {
		x = event.pageX; 
		y = event.pageY;
		//x= x-290;
		//y = y-210;

	}
	
	if (ie4up) {
		x = event.x// + document.body.scrollLeft; 
		y = event.y// + document.body.scrollTop;
		//x= x-180;
		//y = y-190;
	}
	
	//x = x - 5;
	//y = y - 5;
	//	wmtt = Main.main.ContentHelp.contentHelp.document.getElementById("overDiv");
		
	//x = x-176;
	//y=y-165;
	var fname = new Array();
	var imgTitle = new Array();
	
	var aFlag = 0;
	// defines which text belong to the coordinates 
	if ( myX + 120 < x  && x < myX + 155 && 135 + myY < y && y < 190 + myY ) {
		txt ="Germany";
		fname[0] = "logo_iais";
		imgTitle[0] = "Fraunhofer IAIS";
		fname[1] = "rama";
		imgTitle[1] = "Freundeskreis RAMA";
		topValue = 50;
	} else if ( myX + 155 < x  && x < myX + 175 && 165+ myY < y && y < 190 + myY ) {
		txt ="Czech Republic";		
		fname[0] = "ctu";
		imgTitle[0] = "CTU Prague";
		topValue = 50;
	} else if ( myX + 185 < x  && x < myX + 220 && 125+ myY < y && y < 145+ myY ) {
		txt ="Lithuania";
		fname[0] = "siauliai";
		imgTitle[0] = "Siauliai University";		
		fname[1] = "juventa";
		imgTitle[1] = "Juventa School";
	} else if ( myX + 185 < x  && x < myX + 235 && 185+ myY < y && y < 223+ myY ) {
		txt ="Romania";
		fname[0] = "ici";
		imgTitle[0] = "National Institute for Research and <br> Development in Informatics";
		topValue = 50;
	} else if ( myX + 120 < x  && x < myX + 160 && 270 + myY < y && y < 285+ myY ) {
		txt ="Malta";
		fname[0] = "malta";
		imgTitle[0] = "AcrossLimits Limited";
		topValue = 50;
	} else {
		txt ="Project Participants" ; //x"+x+" y"+y;
		aFlag = 1;
	}
	//topValue = 50;	
	if (ie4up) {
			topValue = 50;} else {
			topValue = 230;}
	var	img = " ";
	for( i = 0; i < fname.length; i++ ) {
		img = img + "<img src=\"fileadmin/arise/user_uploads/" +   fname[i] + ".jpg\"/><br><br><b> " + imgTitle[i] +"  </b>"
		if ( i < 1 )
			img = img + "<br><br><br>" ; 
		lastTag = img;
	}

	//img = img+" x"+x+" y"+y;
	if ( aFlag == 1 )
		img = '';//lastTag;
	
	if (ns4up) {
		var lyr = document.overDiv.document
		wmtt.write(txt)
		wmtt.close()
		participants.write(img)
		participants.close()
	}
	if (ie4up) {
		wmtt.innerHTML = txt;
		participants.innerHTML = img;
		//x= x+180;
		//y = y+200;
	}
	//else {
		//x= x+270;
		//y = y+210;
	//}
	if (mozup) {
		wmtt.innerHTML = txt;
		participants.innerHTML = img;
	}
		
	//wmtt.style.display = "block"
	//x = x+176;
	//y=y+185;
	
	
	if (wmtt != null) {
		wmtt.style.left = (x - 40) + "px";
		wmtt.style.top 	= (y - 20) + "px";
		if (ie4up) {
		wmtt.style.left = (x - 40 - 243) + "px";
		wmtt.style.top 	= (y - 20 - 210) + "px";
		
		participants.style.left = 400;
		participants.style.top = 50;

		}else  {
		participants.style.left = 670;
		participants.style.top = 230;
		}
		
		if (aFlag == 1)
			participants.style.top = topValue;
		
		if ( txt == "Lithuania" || txt == "Germany" ) {
			
			if (ie4up) {
			participants.style.top = 50;
			topValue = 50;} else {
			topValue = 200;
			participants.style.top = 230;
			}
		} 
	}
	
	if (ns4up) {
		participants.style.visibility = "show"
		wmtt.style.visibility = "show"
	} else if (ie4up || mozup) { 
		participants.style.visibility = "visible"
		wmtt.style.visibility = "visible"
	}		
}

function deleteToolTip() {
		browserSniffer();
		//Browser Sniffer
	//var ns4up = (Main.main.ContentHelp.document.layers) ? 1 : 0;
	//var ie4up = (Main.main.ContentHelp.document.all) ? 1 : 0;
	//var mozup = (!Main.main.ContentHelp.document.all && Main.main.ContentHelp.document.getElementById) ? 1 : 0;
	
	if ( (ns4up) || (ie4up) || (mozup)) {
		if (ns4up) {
			wmtt = document.overDiv.document;
			participants = document.participants.document;
		}
		if (ie4up) {
			wmtt = document.all.overDiv;
			participants = document.all.participants;
	}
		if (mozup) {
			wmtt = document.getElementById("overDiv");
			//Main.main.ContentHelp.document.onmousemove = mouseMove
			participants = document.getElementById("participants");
	}
	}
	
	if (ns4up) {
		wmtt.style.visibility = "hide";
		participants.style.visibility = "hide";
	}else {//if (ie4up || mozup) 	{
		wmtt.style.visibility = "hidden";
		participants.style.visibility = "hidden"
	}
	text = " ";
	img = " ";
	if (ns4up) {
		var lyr = document.overDiv.document
		wmtt.write(txt)
		wmtt.close()
		participants.write(img)
		participants.close()
	}
	if (ie4up) {
		wmtt.innerHTML = txt;
		participants.innerHTML = img;
	}
	if (mozup) {
		wmtt.innerHTML = txt;
		participants.innerHTML = img;
	}
	
}


var interval
startPosition=0
topPosition=100
endPosition=100
speed=50

function scrollit()
{
if (startPosition!=200)
	{
	startPosition=startPosition+1
	topPosition=topPosition-1
	document.getElementById('display').style.clip="rect(" + (startPosition + 1) + " 100 " + (startPosition + endPosition) + " 0)"
	document.getElementById('display').style.top=topPosition
	interval=setTimeout("scrollit()",speed)
	}
else
	{
	startPosition=0
	topPosition=100
	endPosition=100
	interval=setTimeout("scrollit()",speed)
	}
}

function stopinterval()
{
clearTimeout(interval)
}