function setIframeHeight(iframeName){
    //var iframeWin = window.frames[iframeName];
    var iframeEl = document.getElementById ? document.getElementById(iframeName) : document.all ? document.all[iframeName] : null;
    if (iframeEl) {
        iframeEl.style.height = "100%"; // helps resize (for some) if new doc shorter than previous
        //var docHt = getDocHeight(iframeWin.document);
        // need to add to height to be sure it will all show
        var h = alertSize();
        var new_h = (h + 500);
//		alert(new_h);
        iframeEl.style.height = new_h + "px";
        //alertSize();
    }
}

function alertSize(){
    var myHeight = 0;
    if (typeof(window.innerWidth) == 'number') {
        //Non-IE
        myHeight = window.innerHeight;
    }
    else 
        if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
            //IE 6+ in 'standards compliant mode'
            myHeight = document.documentElement.clientHeight;			

        }
        else 
            if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                //IE 4 compatible
//                myHeight = document.body.clientHeight;
            }
   // window.alert( 'Height = ' + myHeight );
    return myHeight;
}


function sdad(frameId){
    try {
        frame = document.getElementById(frameId);
        innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
        objToResize = (frame.style) ? frame.style : frame;
        objToResize.height = innerDoc.body.scrollHeight + 10;
    } 
    catch (err) {
        window.status = err.message;
    }
}

function calcHeight(){
    //find the height of the internal page
    var the_height = document.getElementById('bookingEngine').contentWindow.document.body.scrollHeight;
    
    //change the height of the iframe
    document.getElementById('bookingEngine').height = the_height;
}


function autoIframe(frameId){
    try {
        frame = document.getElementById(frameId);
        innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
        objToResize = (frame.style) ? frame.style : frame;
        objToResize.height = innerDoc.body.scrollHeight + 10;
    } 
    catch (err) {
        window.status = err.message;
    }
}

function seGamao(frameId){
	frame = document.getElementById(frameId);
	
	alert(frame);
}
