// main.js

<!--//
var mainpath = "/index.php?page=";

function navigate_to_page(page){
 
	path = mainpath + page;
	window.document.location = path;

}

function openPopup(path, description){

	var newwin = window.open(path, description, "location=0,status=0,scrollbars=0,width=400, height=300");
    if (newwin != null) {
        newwin.focus()
    }
}

function changeParentLocation(path){
	//window.opener.location = path;
    var winparent;
    
    if (typeof(opener)=="object") {
        if (opener.closed) {
            winparent = window.open(path,'parentwindow','');
   	    } else {
            //opener.location.href = path;
            //break out of frames
            winparent = opener.top
            winparent.location.href = path;
        }
    } else {
        winparent = window.open(path,'parentwindow','');
    }
    if (winparent!=null) {
        //winparent.focus()
    }
    //window.close();
}

var posX;
var posY;
function showtooltip(obj, e){
   
	//alert(e.clientX);
	posX = e.clientX;
	posY = e.clientY;
	styleText = "position:relative;"
	            + "left:" + (e.clientX + 10) + ";"
	            + "top:" + (e.clientY + 10)  + ";" 
	            + "display: block;";
	            //alert(document.all.tap.style);
	            //alert(document.all.tap.style.position);
	document.all.tap.style.position = "absolute";
	document.all.tap.style.left = (e.clientX );
	document.all.tap.style.top = (e.clientY );
	document.all.tap.style.display = "block";  
}
function keepshowtooltip(){
   
    document.all.tap.style.left = posX;
	document.all.tap.style.top = posY;
	document.all.tap.style.display = "block";  
}
function hidetooltip(obj, e){
   
	
	//document.all.tap.style.display = "none";  
}

//-->
