
var WinTop="50";
var WinLeft="50";

function open_image_window(url,w,h)
 {
	if (!w || !h) {
	w = 600;
	h = 600;
	}

    if (!image_window.closed && image_window.location) {
        image_window.close();
    }
	features = 'title=0, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=no, resizable=no, width='+w+', height='+h+', top='+WinTop+", left="+WinLeft;
	image_window = window.open(url, '',features);
	image_window.opener = self;

    if (!image_window.opener) {
       image_window.opener = self;
    }

    if (window.focus) {
        image_window.focus();
    }

    return false;
 }

function ChangeinnerHTML(layerid, htmlcode)
{
    var statement = '';
    if (document.all) 
	  statement += "document.all['" + layerid + "'].innerHTML = '" + htmlcode + "';";	     
    else if (document.getElementById)           
	  statement += "document.getElementById('" + layerid + "').innerHTML = '" + htmlcode + "';"; 
    eval(statement);    
}	
