/* Zeilenhighlighting in der Publikationsübersicht */

function highlightRow(rowType, rowId) {
   theRow = document.getElementById(rowType+rowId);
   switch (theRow.className) {
      case "odd":
         theRow.className = "odd-selected";
         break;
      case "even":
         theRow.className = "even-selected";
         break;
      case "odd-selected":
         theRow.className = "odd";
         break;
      case "even-selected":
         theRow.className = "even";
         break;
      default:
         break;
   }
}

function enableField(fieldId, fieldRequisite) {
   theField = document.getElementById(fieldId);
   theField.disabled = false;
   if (fieldRequisite == true) {
      theField.className = "text pflichtfeld";
   } else {
      theField.className = "text";
   }
}

function disableField(fieldId) {
   theField = document.getElementById(fieldId);
   theField.disabled = true;
   theField.className = "text disabled";
}
   

function popup(url,name,width,height,top,left,scroll){
   if(typeof(f) != 'object'){
      f = window.open(url,name,'width=' +width +',height=' +height +',left=' +left +',top=' +top +',scrollbars=' +scroll +',statusbar=no,resizable=yes');
      f.focus;
      f.onBlur = "close()";
   }else{
      f.close();
      f = window.open(url,name,'width=' +width +',height=' +height +',left=' +left +',top=' +top +',scrollbars=' +scroll +',statusbar=no,resizable=yes');
   }
   return false;
}

function popupPublikation(nr) {
	switch(nr) {
		case 127:
			popup('html/inhalt_publikationen_detail127.html', 'detail127', 700, 550, 100, 50, 'yes');
			break;
	}
}

$(document).ready(function(){
	$("ul#location").tabs({ fx: { opacity: 'toggle' } });
	$(".ui-tabs-hide").hide();
	
	$(".pub127").click( function() {
		popupPublikation(127);
	});
});