function resizeIFrame() {
/*	var iframe = parent.document.getElementById("iframeId"); 
	
	if (detectBrowser() == "ie")
		iframe.height = iframe.Document.body.scrollHeight;
	else if (detectBrowser() == "mozilla")
		iframe.height = iframe.contentDocument.body.offsetHeight+50;//extra height*/
}

/*function detectBrowser() {

    if (document.all != undefined) return "ie";
    if ((window)&&(window.netscape)&&(window.netscape.security)) return "mozilla";
    
    return "ie";
}*/

function portalink(urllink)
{
	   var portalink="", alvolink=0, maquinalink;
	   var cimm=1, uol=0;
	   alvolink = urllink;
	   maquinalink="";

		uol = 1;

	   	   if ((urllink.substring(0,8)) == "/cgi-win") 
			{
				alvolink = "http://construtor.cimm.com.br" + urllink;
			}
			else
			{
				alvolink = urllink;
			}			

		//parent.frames["iframeName"].location.href = alvolink;

		if (urllink.indexOf("/guia/jsps/emp.jsp?tid") != -1) {
			parent.window.location.href = alvolink;
		}else {
			window.location.href = alvolink;
		}
}

function adjustFrame(frame) {
	var frmTemp;
	if (document.all) {
		var w = frame.document.body.scrollWidth;
		var h = frame.document.body.scrollHeight;

		if(frame.document.body.scrollWidth > frame.document.body.offsetWidth) 
			document.all[frame.name].height = h + 30;		
		else
			document.all[frame.name].height = h;		
	}
	else if (document.getElementById) {
		var w = frame.document.width;
		var h = frame.document.height;
	
		if(frame.document.body.scrollWidth > frame.document.body.offsetWidth) 
			document.getElementById(frame.name).height = h + 30;
		else 
			document.getElementById(frame.name).height = h;	
	}
	return false;
}
