function selector(lenke, img_nr){
//	alert('img_nr: '+img_nr)
//	alert(document.forms["cas"].name)
document.forms["cas"].current_image.value=img_nr;
	// Popup-vindu som viser alle selectors:
	var w=700;
	var h=300;
	//alert(lenke);
	//alert(img_nr);
   var windowoptoins = "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1"; 
   var popupWindow = window.open(lenke+'?in='+img_nr, 'Imagezoom', windowoptoins + ',width=' + w + ',height=' + h); 
   var focus = popupWindow.focus(); 
	
}

function selectedImage(nodePath, imagePath){
var si = opener.window.document.forms["cas"].current_image.value;
	szSRC='http://www.calvin-and-hobbes.org/'+imagePath;
//	szSRC='http://calvin.development/'+imagePath;
//	opener.window.document.images['I1'].src=szSRC;
	eval('opener.window.document.images["i'+si+'"].src=szSRC');
	eval('opener.window.document.forms["cas"].ContentObjectAttribute_ezstring_data_text_'+si+'.value="'+nodePath+'"');
self.close();
	
}

function showhide( elm_id ){
	var elm = document.getElementById( elm_id );  
	var current_state=elm.style.display;
	if(current_state == 'none'){
		elm.style.display='';
	}else{
		elm.style.display='none';
	}
}

function printMembershipCard(w,h,lenke){
   var windowoptoins = "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1"; 
   var popupWindow = window.open(lenke, 'Membership Card', windowoptoins + ',width=' + w + ',height=' + h); 
   var focus = popupWindow.focus(); 
}