	function rowOver(row, id){
		row.className = 'rowover';
		if((id % 2)==0){
					
		} else {
			
		}	
	}
	function rowOut(row, id){
		if((id % 2)==0){
			row.className = 'roweven';			
		} else {
			row.className = 'rowuneven';	
		}	
	}
/*
	Lets you toogle a picture on and off. On page image should be invisible (clearpic)
	then on tooglePic, the loaded-src is saved, and exchanged to the new src suppiled as arg
	on the second tooglePic, the load-time src is restored, and so on...
	one advantage is that the pictures are actually loaded on demand, when they are showed first time
	
*/

var loadPics = Array();	
function tooglePic(imgId,url){
        	    
    if(loadPics[imgId] == null){
        loadPics[imgId] = document.all[imgId].src;
    }    
    if(loadPics[imgId] != null && document.all[imgId].src == loadPics[imgId]){
        document.all[imgId].src = url;
    } else if(loadPics[imgId] != null && document.all[imgId].src != loadPics[imgId]){
        document.all[imgId].src = loadPics[imgId];
    }        
}
	
	
	
function showZoom(img,title) {  <!--<< Smarty fix -->
		//alert(img);
		
		var zoomAddress = 'zoom.php?zoomImage=' + img + '&title=' + title;
		args = new Array();
		args['height'] = 600;
		args['width'] = 800;
		args['scrollbars'] = true;
		myref = openPopUp(zoomAddress, 'piczoom',true,args);
		myRef.focus();
		//window.open(zoomAddress,'zoom', 'width=800,height=600,left=50,top=50,toolbar=no,scrollbars=yes,titlebar=no,status=no,resizable=yes');
    
} 

var w = 800, h = 600; //<--default screen-size if none detected
var defs = new Array();
defs['height'] = 400;
defs['width'] = 500;
defs['left'] = 50;
defs['top'] = 50;

function openPopUp(url, name, center, args){
            
            if (document.all || document.layers) {
                w = screen.availWidth;
                h = screen.availHeight;
            }            
            topP = (args['top'])?args['top']:defs['top']; 
            left = (args['left'])?args['left']:defs['left'];            
            height = (args['height'])?args['height']:defs['height'];
            width = (args['width'])?args['width']:defs['width'];
            scrollbars = (args['scrollbars'])?1:0;
            status = (args['status'])?1:0;
            
            if(center){
                left = (w-width)/2;
                topP = (h-height)/2;
            }                        
	    myRef = window.open(url,name,'left='+left+',top='+topP+',width='+width+',height='+height+',menubar=0, scrollbars='+scrollbars +', toolbar=0,resizable=1,  location=0, directotries=0, status='+status+'');	
            return myRef;    
}

      
       
function openEditor(edurl, popW, popH){
            
		args = new Array();
		args['height'] = popH;
		args['width'] = popW;
		args['scrollbars'] = true;
		args['status'] = false;
		
		//window.showModalDialog(edurl,"editor","dialogHeight: "+popH+"px; dialogWidth: "+popW+"px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: Yes; status: Yes;");
		
		myref = openPopUp(edurl, 'editor',true,args);
		myRef.focus();
}


function confirmLink(theLink, confirmMsg)
{
    // Confirmation is not required in the configuration file
    //if (confirmMsg == '') {
    //    return true;
    //}

    var is_confirmed = confirm(confirmMsg);
    if (is_confirmed) {
        theLink.href += '&confirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

<!--<< Smarty fix -->


function MM_swapImgRestore() { //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_preloadImages() { //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_preloadImages.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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		but_gal_01_over = newImage("images/but.gal_01-over.gif");
              buthome_01_over = newImage("images/buthome_01-over.gif");
                kont_01_over = newImage("images/kont_01-over.gif");

		preloadFlag = true;
	}
}

 function show_pic(URL,NAME,OPTIONS)
 {
	fenster=window.open(URL,NAME,OPTIONS);
	fenster.focus()
 }




function MM_swapImgRestore() { //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_preloadImages() { //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_preloadImages.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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  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_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
<!--
function MM_swapImgRestore() { //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_preloadImages() { //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_preloadImages.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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  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_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
