function visinaProzora(){
	return (document.compatMode!="BackCompat")? document.documentElement : document.body;
	}
function resizeIframe(frameId,level){
	var nivo = "";
	var minHeight = 100;
	switch(arguments.length) { 
       case 0: 
           return; break;
	  case 1: 
		nivo = ""; break;
	  case 2:
		if (level == "top") {
			nivo = "window.top.";
		} else {
			if (level == "parent") {
				nivo = "window.parent.";
			} else {
		           return; 
		     }
		}
		break;
	  default:
           return;  break;
     }
     var visina;
	try{
		frame = eval(nivo+'document.getElementById("'+frameId+'");');
		innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
		objToResize = (frame.style) ? frame.style : frame;
		// bez ovog ne radi dobro resize s veceg na manje
		objToResize.height =  "1px";
		visina = parseInt(innerDoc.body.scrollHeight);
		visina = (visina<minHeight) ? minHeight : visina;
		objToResize.height = visina + "px";
		return visina;
	}
	catch(err){
		window.status = err.message;
	}
}


