function doIframe(obj){
//	o = document.getElementsByTagName('iframe');
//	for(i=0;i<o.length;i++){
//		if (/\bautoHeight\b/.test(o[i].className)){
//        obj.onloadFrame=function(){
//            alert(loading);
//            if(loading){
//                loading.style.display="none";
//            }else{
                setHeight(obj);
//            }
//        }		//addEvent(obj,'load', doIframe);
//		}
//	}
}

function setHeight(e){
    if (e.Document && e.Document.body.scrollHeight){//ie5+ syntax
        e.height = e.contentWindow.document.body.scrollHeight + 20;
        e.contentWindow.document.body.style.padding = '5px';
    }else if(e.contentDocument && e.contentDocument.body.scrollHeight){ //ns6+ & opera syntax
        e.height = e.contentDocument.body.scrollHeight + 60;
        e.contentWindow.document.body.style.padding = '5px';
    }else if(e.contentDocument && e.contentDocument.body.offsetHeight){
        e.height = e.contentDocument.body.offsetHeight + 60;
        e.contentWindow.document.body.style.padding = '5px';
    } //standards compliant syntax – ie8
}

function addEvent(obj, evType, fn){
	if(obj.addEventListener)
	{
	obj.addEventListener(evType, fn,false);
	return true;
	} else if (obj.attachEvent){
	var r = obj.attachEvent("on"+evType, fn);
	return r;
	} else {
	return false;
	}
}

//if (document.getElementById && document.createTextNode){
// addEvent(window,'load', doIframe);
//}