//var tabs = new Array(0,);
var tabcnt = 5;


function show_img(img, w, h) {
  wnd=window.open(img,'','width='+w+', height='+h+',scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no');
  wnd.document.write("<HTML><HEAD><TITLE></TITLE></HEAD>");
  wnd.document.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0' bgcolor='#000000'><a href=javascript; onClick=window.close();><img src='"+img+"' border='0'></a></BODY>");
}

function show_user(img, w, h, title) {
  wnd=window.open(img,'','width='+w+', height='+h+',scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no');
  wnd.document.write("<HTML><HEAD><TITLE>"+title+"</TITLE></HEAD>");
  wnd.document.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0' bgcolor='#000000'><a href=javascript; onClick=window.close();><img src='/images/employee_photo/"+img+"' border='0'></a></BODY>");
}

function popup(src, w, h, id) {
  wnd=window.open(src,'','width='+w+', height='+h+',scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no');
  wnd=window.focus();
}

function translate(src, w, h) {
      wnd=window.open(src, '', 'width='+w+', height='+h+',scrollbars=yes,resizable=no,status=no,toolbar=no,menubar=no');
      wnd=window.focus();
}

function winreload() {
  window.opener.location.reload();	
  window.close();
}

function show_rte(id_form, ta_name) {
  var rte_comment = new _RichtextEditor(document.id_form.elements[''+ta_name+'']);
  rte_comment.style = "width: 100%; height: 100px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000;";
  rte_comment.Init();  
}

function toggle(who,shw, hid) {
 if (document.getElementById(who).style.display == 'none' ) {
   document.getElementById(who).style.display = 'inline';
   document.getElementById(shw).style.display = 'inline';
   document.getElementById(hid).style.display = 'none';	 
 }
 else {
   document.getElementById(who).style.display = 'none';
   document.getElementById(shw).style.display = 'none';
   document.getElementById(hid).style.display = 'inline';
 }
}

function show_tab(tabid){
    for(i = 0; i < tabcnt; i++){
	tabname='tab'+i;
	tabbody='tab'+i+'body';
	tabinn='tab'+i+'_inner';
	if(i == tabid){
	    _SetClass(tabname,'active');
	    _SetClass(tabinn,'inn_active');
	    _Show(tabbody);
	}else{
	    _SetClass(tabname,'inactive');
	    _SetClass(tabinn,'inn_inactive');
	    _Hide(tabbody);
	}
    }

}

