function printWithBigImges() {
  var divs = document.getElementsByTagName("div");
  var i = 0;
  var id = null;
  var clazz = null;
  var smallImageId = null;
  var bigImageId = null;
  while (divs[i]) {
    id = divs[i].id;
    clazz = divs[i].className;
    if (clazz.indexOf("zoombild mini")>=0) {
      smallImageId = id;
    }    
    if (clazz.indexOf("zoombild maxi")>=0) {
      bigImageId = id;
    }
    if (smallImageId != null && bigImageId != null) {
      //alert("divTausch("+smallImageId+","+bigImageId+")");  
      divTausch(smallImageId, bigImageId);
      smallImageId = null;
      bigImageId = null;
    }
    i++;
  }
  window.print();
}

function ht0(o,t){if(!o.value){o.style.color='#666';o.value=t;}}
function ht1(o,t){if(o.value==t){o.style.color='#000';o.value='';}}


function checkAll(myForm,myState) {
	if (myState) {
		for (i=0; i < myForm.elements.length; i++) {
			if (myForm.elements[i].type ==  "checkbox" && myForm.elements[i].id.indexOf("cbx") == 0){
				myForm.elements[i].checked = 1;
			}

		}
	}
}

function checkSingle(myForm) {
	myAll = true;
	for (i=0; i < myForm.elements.length; i++) {
			if ((myForm.elements[i].type == "checkbox") && (myForm.elements[i].id != "cbx1") && (myForm.elements[i].checked != 1))
				myAll = false;	
	}
	
	if (myAll) {
		document.getElementById("cbx1").checked = 1;	
	} else {
		document.getElementById("cbx1").checked = 0;
	}
}

function pimpMyLink(myUri,myInput,myLink) {
	myStr = document.getElementById(myInput).value;
	
	if (myStr != '') {
		myLink.href = myUri + '?srcval=' + myStr; 
	} else {
		myLink.href = myUri;
	}
	
	return false;
}

function divTausch (div_aus, div_ein, div_ein_b) {
	document.getElementById(div_aus).style.display="none";
	document.getElementById(div_ein).style.display="block";
}
/* artikelbewertung rollover für modulM4*/
// Example: obj = findObj("image1");
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}

function Wertung_Rollover(id,state){
	var imgID,pfad,img,a,s;
	imgID="wertung"+id;
	img= findObj(imgID);
	if (img){
		if (img.src){
			a=img.src.split("/");
			a.pop();
			s = (state == 1) ? "_ein" : "_aus" ;
			pfad=a.join("/") + "/" + "wertung" + id + s + ".gif";
                                                             	img.src=pfad;
		}
	}
}



