var browser = 0 ; // browser : 0 = unknown ; 1 = MSIE ; 2 = NS
if (document.all)
  browser = 1 ;
if (document.layers)
  browser = 2 ;

function MM_Re() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_pre() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_pre.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_fi(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_fi(n,d.layers[i].document); return x;
}

function MM_sw() { //v3.0
  var i,j=0,x,a=MM_sw.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_fi(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function lite(what,col1,col2){
what.style.borderColor=col1
what.style.background=col2
}

function lit_on(e){
if (document.all)
source3=event.srcElement
else if (document.getElementById)
source3=e.target
if (source3.className=="me"){
lite(source3,"#aabbcc","#ffffff")
}
else{
while(source3.tagName!="TABLE"){
source3=document.getElementById? source3.parentNode : source3.parentElement
if (source3.className=="me")
lite(source3,"#aabbcc","#ffffff")
}
}
}

function lit_off(e){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="me")
lite(source4,"#ffffcc","#dddddd")
else{
while(source4.tagName!="TABLE"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="me")
lite(source4,"#ffffcc","#dddddd")
}
}
}

function popup(url,wi,hi,not_pic) {
if(not_pic!=undefined&&not_pic) window.open(url,'openpop','top=100, left=100,fullscreen=no,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,width='+wi+',height='+hi+',scrollbars=1').focus();
else {
openpop = window.open("", "openpop", "width="+(wi+20)+",height="+(hi+30)+",left=100,top=100,resizable=no");
openpop.document.write('<html><body bgcolor=lightgrey><script language=JavaScript>\n<!--\nvar message="ups...";function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function("return false")\n// -->\n<'+'/script><a href="#" onclick="window.close();" title="click for close"><img src="'+url+'" width="'+wi+'" height="'+hi+'" border=0></a></body></html>'); 
openpop.focus();
}
}
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
function xGetElementById(e) {
  if(typeof(e)!="string") return e;
  if(document.getElementById) e=document.getElementById(e);
  else if(document.all) e=document.all[e];
  else if(document.layers) e=xLayer(e);
  else e=null;
  return e;
}
function xLayer(id,root) { // only for nn4
  var i,layer,found=null;
  if (!root) root=window;
  for(i=0; i<root.document.layers.length; i++) {
    layer=root.document.layers[i];
    if(layer.id==id) return layer;
    if(layer.document.layers.length) found=xLayer(id,layer);
    if(found) return found;
  }
  return null;
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  xmlhttp = new XMLHttpRequest();
}
function renew(it,src) {
	var obj = xGetElementById(it);
	xmlhttp.open("GET",src+'.php',true);
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}

