/****************************************
	$Id: $
*****************************************/

/****************************************
	ROLLOVERS
*****************************************/
var rollOvers = new Array();

function imgRollOver(src,srcOver,width,height,id)
{
    var s = '<img src="' + src + '"'
        + ' border="0"' 
        + ' onMouseOver="this.src=\'' + srcOver + '\'"'
        + ' onMouseOut="this.src=\'' + src + '\'"';

    if (width)
        s += ' width="' + width + '"';
    if (height)
        s += ' height="' + height + '"';
    if (id)
        s+= ' id="' + id + '"';
    s += '>';

    rollOvers[rollOvers.length] = new Image();
    rollOvers[rollOvers.length-1].src = srcOver;
    rollOvers[rollOvers.length-1].src2 = src;
    rollOvers[rollOvers.length-1].id = id;

    document.write(s);
}

function PopupWindow(url,width,height){
    var num = Math.round(Math.random()*10000000);
    var str = new String(num);
    var win = window.open(url,str,"toolbar=no,location=no,directories=no,"+
      "status=no,menubar=no,scrollbars=no,resizable=no,"+
      "copyhistory=no, width="+width+",height="+height+",left=50,top=50");
}

function PopupImage(url,width,height,title)
{
    var windowheight = height+40;
    var windowwidth = width+20;

    var left = (screen.width - windowwidth)/2;
    var top = (screen.height - windowheight)/2 - 18;
    
    var scrollbars = "no";
    
    if (left<0) { scrollbars = "yes"; left = 32; windowwidth = screen.width - 2*left; }
    if (top<0) { scrollbars = "yes"; top = 32; windowheight =  screen.height - 2*top - 18; top = top - 18; }

    var num = Math.round(Math.random()*10000000);
    var str = new String(num);
    var win = window.open("",str,"toolbar=no,location=no,directories=no,"+
        "status=no,menubar=no,scrollbars=" + scrollbars + ",resizable=no,"+
        "copyhistory=no, width="+windowwidth+",height="+windowheight+",left=" + left + ",top=" + top);
    win.document.write("\<HEAD\>\<link rel=\"stylesheet\" type=\"text\/css\" href=\"\/style.css\"\/\>\<meta http-equiv=\"pragma\" content=\"no-cache\"\>\<TITLE\>"+title+"\<\/TITLE\>");
    win.document.write("\<link rel=\"STYLESHEET\" type=\"text/css\" href=\"css/style.css\"\>");
    win.document.write("\<\/HEAD\>");
    win.document.write("\<BODY topmargin=0 leftmargin=0\>\<center\>\<img src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" border=0 vspace=\"10\" height=\"10\"\>\<BR\>\<a href=\"javascript:window.close();\" class=\"popup\"\>Close\<\/a\>\<\/center\>\<\/BODY\><\/HTML\>");
}

function jmShowHelp(url)
{
    var width  = 750;
    var height = 580;
    var left   = (screen.width - width)/2;
    var top    = (screen.height - height)/2

    var win = window.open(url,null,"toolbar=no,location=no,directories=no,"+
      "status=no,menubar=no,scrollbars=yes,resizable=yes,"+
      "copyhistory=no, width="+width+",height="+height+",left=" + left + ",top=" + top);
   
    return false;

}