if (document.all) { 
docObj = "document.all."
styleObj = ".style"

ie =true
}

else
{
docObj = "document."  
styleObj = ""
ie =false
}


function loaded(){
	
}

function popUpDynamic(evt, displayStr) { 
	popUpContainer = document.getElementById("popup");
	popUpContainer.innerHTML = displayStr;
	popUp(evt, "popup");
}
var count = 0
function showDyn(evt, i) {
	count++;
	//alert(count);
	displayStr = eval('a'+ i)
	popUpContainer = document.getElementById("popup");
	popUpContainer.innerHTML = displayStr;
	popUp(evt, "popup");
	//if (count < 1){
	//	alert(popUpContainer.innerHTML + count);
	//}
	//
}

function move(evt,value) {
			popUp(evt,"A"+value)
}
function popUp(evt, ggg) { 
	
id = ggg
	if (ie){
		if (document.body.clientHeight < evt.y + 60){
			xy = parseInt(evt.y) - 60
		}
		else xy = parseInt(evt.y)
		if (document.body.clientWidth < evt.x + 151){
			xc = parseInt(evt.x) - 150
		}
		else xc = parseInt(evt.x)
		popUpWin = eval(docObj + ggg + styleObj)
		 popUpWin.top = xy + 23 + document.body.scrollTop
		popUpWin.left = Math.max(2, xc) + 5 
		popUpWin.visibility = "visible"  
		popUpWin.status = ""
		//alert("i")	
	}
    else{
          if (window.innerWidth < evt.pageX + 150){
	xc = evt.pageX - 150

	}
	else xc = evt.pageX

	if (window.innerHeight  + window.pageYOffset < evt.pageY + 50){
		xy = evt.pageY - 40

	}
	else xy = evt.pageY  + 30

	document.getElementById(id).style.top = xy +"px";
	document.getElementById(id).style.left = xc +3  +"px"; 
	document.getElementById(id).style.visibility = 'visible'
	}


}

function popDown() {
 document.getElementById(id).style.visibility =  "hidden"	
}

function displayMsg(evt, msg) {
	document.getElementById('msg').innerHTML = msg;
	//alert('hi' +msg)
	popUp(evt,'msg')
	
}

function hidemsg(){
	document.getElementById('msg').innerHTML =  "";	
}

function groupShow(evt, index, number) {
	
	try{
			value = "" + eval("a71")
			value = value + " " + index;
			if (number != -1)
				value += " - " + eval('a'+ number)
			group = document.getElementById("group_popup");
			group.innerHTML = "" + value; 
			popUp(evt,"group_popup")	
		}
		catch(e){ // if the variable to a71 hasn't been defined then use this one. 
			if (number != -1)
				popUp(evt,"A"+number)
		}
}

var id;
function show(evt,value) {
		popUp(evt,"A"+value)
	}
	
function play(evt,value) {


		popUp(evt,"A"+value)
		
	}
function change(event){
	if (ie){
		event = window.event
		var here = event.srcElement;
		here.parentNode.style.background = "url('/images/new/norm_right_on.gif') no-repeat right top"
	}
}
function changeOff(event){
	if (ie){
		event = window.event
		var here = event.srcElement;
		here.parentNode.style.background = "url('/images/new/norm_right.gif') no-repeat right top"
	}
}
