
var NS4=(navigator.appName=='Netscape' && parseInt(navigator.appVersion)==4);
var NS6=(document.getElementById)? true:false;
var IE4=(document.all)? true:false;

	var num = 0;


function display(id, str) {
  if (NS4) {
   
    with (document[id].document) {
	open();
      write(str);
      close();
    }
  } else {
    document.getElementById(id).innerHTML = str;
  }
}


function popup(url){
	window.open(url,"","resizable=1, width=800,height=450");
}
function popup1(url,d, h){
	window.open(url,"","resizable=1, width="+d+",height="+h);
}

  
	function showPicture(url,w,h, next){
	size();
		var yOff = (document.all?document.body.scrollTop:window.pageYOffset);
			var cd;
			cd=document.getElementById('popupPic');
			cd.style.visibility="visible";
				 cd.style.top=yOff+(myHeight-h)/2;
				 cd.style.width=w+20;
				 cd.style.height=h+45;
				 cd.style.left=(myWidth-w)/2;
			document.getElementById('choose_div').innerHTML='<div id="picture" onclick="if(document.getElementById(\'pict_'+next+'\')!=null) document.getElementById(\'pict_'+next+'\').onclick(); else document.getElementById(\'pict_1\').onclick(); "><center><img src="'+url+'"  style="border:1px solid #eee;"/></center></div>';			
							
		
	}
	function hide(){
			var cd=document.getElementById('popupPic');
			cd.style.visibility="hidden";		
	}

 var myWidth = 0, myHeight = 0;
  function size(){
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  }


var color;
function ChangeColor(tableRow, highLight)
    {
    if (highLight)
    {
      color=tableRow.style.background;
      tableRow.style.background = '#dcfac9';
      tableRow.style.cursor='pointer';
    }
    else
    {
      tableRow.style.background = color;
    }
  }