

var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;var _iframeLayer = null;var _iframeIndex = 0;
function iframeLayer(strWindow) {
 this.objParam = null; this.strMethod = null; this.strUrl = null; this.needDisplay = false; this.objWindow = (strWindow)? eval(strWindow) : eval('window');}
iframeLayer.prototype = {

 iframeid : 'iframe_layer',

 objIframe : null,

 iframeWidth : 500,

 iframeHeight : 0,

 maskid : 'iframe_mask',

 objMask : null,

 objMaskColor : '#000000',

 objForm : null,

 formSrc : null,

 objIframeContainer : null,

 zIndex : 100,

 displayMask : false,

 locationFlag : false,

 objLoadingDiv : null,

 objPopDiv : null,

 popDivClass : null,

 popDivWidth : 0,

 advanceLoad : false,

 modeNum : 0,

 modeHeaderInfo : '',

 modeType : 1, 

 useDrag : true,

 locationWidth : 1024, 

 setParam : function (objParam) {
 this.objParam = objParam; },

 setIframeWidth : function (width) {
 this.iframeWidth = width; },

 setSubmitMethod : function (strMethod) {
 this.strMethod = strMethod.toUpperCase(); },

 setSubmitUrl : function (strUrl) {
 this.strUrl = strUrl; },

 setDisplayType : function (isNeed) {
 this.needDisplay = isNeed; },

 setIframeContainer : function (objContainer) {
 this.objIframeContainer = objContainer; },

 setForm : function (objForm) {
 this.objForm = objForm; },

 setFormAction : function (formAction) {
 this.formAction = formAction; },

 setMaskColor : function (colorCode) {
 this.objMaskColor = colorCode; },

 setzIndex : function (zIndex) {
 this.zIndex = this.zIndex + zIndex; },

 setIframeid : function (id) {
 this.iframeid = id; },

 setMaskid : function (id) {
 this.maskid = id; },

 setDisplayMask : function (isDisplay) {
 this.displayMask = isDisplay; },

 setUseMode : function (modeNum) {
 this.modeNum = modeNum; },

 setAdvanceLoad : function (advanceLoad) {
 this.advanceLoad = advanceLoad; },

 setHeaderInfo : function (headerInfo) {
 this.modeHeaderInfo = headerInfo; },

 setModeType : function (type) {
 this.modeType = type; },

 setPopDivClass : function (className) {
 this.popDivClass = className; },

 setPopDivWidth : function (width) {
 this.popDivWidth = width; },

 setUseDrag : function (useDrag) {
 this.useDrag = useDrag; },

 setLocationWidth : function (width) {
 this.locationWidth = width; },

 doSubmit : function () {
 if (this.strMethod == 'POST') {
 this.doPost(); } else {
 if (this.strUrl == null) {
 alert('strUrl must be not null!'); return false; }
 this.doGet(); }
 return true; },

 doPost : function () {
 
 if (this.objForm == null) {
 alert('objForm must be not null!'); return false; }
 if (this.objForm.action == '') {
 if (this.formAction != '') {
 this.objForm.action = this.formAction; } else {
 alert('objForm.src must be not null!'); return false; }
 }
 this.writeThePostIframe(); this.objForm.target = this.iframeid; this.objForm.submit(); this.objForm = null; },

 writeThePostIframe : function () {
 this.createIframe(); this.createPopDiv(); if (this.needDisplay) {
 this.createLoading(); if (this.advanceLoad) {
 this.fixIframe(); } else {
 this.initIframe(); }
 } else {
 this.hiddenIframe(); }
 return true; },

 doGet : function () {
 var name; var value; var src = ''; var iframeSrc = ''; var cnt = 0; for (var i in this.objParam) {
 cnt++; name = i; value = this.objParam[i]; if (cnt == 1) {
 src = '?'+name+'='+value; } else {
 src += '&'+name+'='+value; }
 }
 if (cnt > 0) {
 var dateObj = new Date(); src += '&t='+dateObj.getTime(); dateObj = null; }
 this.objParam = null; var iframeSrc = this.strUrl+src; if (!this.isExist()) {
 this.writeTheGetIframe(iframeSrc); } else {
 this.modifyExistIframe(iframeSrc); }
 },

 modifyExistIframe : function (iframeSrc) {
 if (iframeSrc != '') {
 if (this.modeHeaderInfo != '') {
 this.changeHeaderInfo(this.modeHeaderInfo); }
 this.objIframe.src = iframeSrc; this.objPopDiv.style.zIndex = this.zIndex + this.objWindow._iframeIndex + 1; this.objWindow._iframeIndex++; 
 this.objWindow = null; this.objPopDiv = null; this.objIframe = null; } else {
 alert('iframeSrc must be not null!'); return false; }
 return true; },

 writeTheGetIframe : function (iframeSrc) {
 if (iframeSrc != '') {
 this.createIframe(iframeSrc); this.createPopDiv(); if (this.needDisplay) {
 if (this.displayMask) {
 this.createMask(); }
 this.createLoading(); if (this.advanceLoad) {
 this.fixIframe(); } else {
 this.initIframe(); }
 } else {
 this.hiddenIframe(); }
 } else {
 alert('iframeSrc must be not null!'); return false; }
 return true; },

 fixIframe : function () {
 try {
 if (this.objIframe) {
 if (!this.locationFlag) {
 var scrollTop = this.objWindow.document.body.scrollTop + this.objWindow.document.documentElement.scrollTop; this.objPopDiv.style.top = (scrollTop + 50) + 'px'; this.locationFlag = true; }
 this.objIframe.style.height = "600px"; this.objIframe.height = 600; this.objPopDiv.style.visibility = 'visible'; }
 var _instance = this; if (isIE) {
 this.objIframe.attachEvent('onload', (function () {
 _instance.adjustIframeHeight(); })); this.objIframe.attachEvent('onfocus', (function () {_instance.adjustIframeIndex()})); } else {
 this.objIframe.addEventListener('load', (function () {
 _instance.adjustIframeHeight(); }), false); }
 } catch (e) {
 
 return; }
 },

 hiddenIframe : function () {

 this.objPopDiv.style.display = 'none'; },

 createIframe : function (iframeSrc) {
 this.objIframe = this.objWindow.document.createElement("iframe"); this.objIframe.setAttribute("src", (iframeSrc)?iframeSrc:''); this.objIframe.setAttribute("width", (this.iframeWidth)?this.iframeWidth:'100%'); this.objIframe.setAttribute("id", this.iframeid); this.objIframe.name = this.iframeid; this.objIframe.scrolling = "no"; this.objIframe.frameBorder = "0"; this.objIframe.allowTransparency = true; },

 createPopDiv : function () {
 this.objPopDiv = this.objWindow.document.createElement("div"); 
 this.objPopDiv.setAttribute("id", this.iframeid+'_div'); this.objPopDiv.style.position = 'absolute'; this.objPopDiv.style.zIndex = this.zIndex + this.objWindow._iframeIndex + 1; this.objWindow._iframeIndex++; this.objPopDiv.style.visibility = 'hidden'; 
 if (iframeLayerMode.getModeWidth(this.modeType, this.modeNum, this.iframeWidth) > 0) {
 this.objPopDiv.style.width = iframeLayerMode.getModeWidth(this.modeType, this.modeNum, this.iframeWidth) + 'px'; }
 this.objPopDiv.className = this.popDivClass?this.popDivClass:iframeLayerMode.getModeClass(this.modeType, this.modeNum); this.objPopDiv.innerHTML = iframeLayerMode.getModeHTML(this.iframeid, this.modeType, this.modeNum, this.modeHeaderInfo, this.useDrag); 
 this.bindIframe(); this.locationIframeX(); },

 bindIframe : function () {
 
 this.objWindow.document.body.insertBefore(this.objPopDiv, this.objWindow.document.body.firstChild); var objBoxBody = this.objWindow.document.getElementById(this.iframeid + '_body'); if (!objBoxBody) {
 this.objPopDiv.appendChild(this.objIframe); } else {
 objBoxBody.appendChild(this.objIframe); }
 objBoxBody = null; 
 if (isIE) {
 if (this.objWindow.document.frames[this.iframeid]) {
 this.objWindow.document.frames[this.iframeid].name = this.iframeid; 
 }
 }
 },

 initIframe : function () {
 var _instance = this; var tempIframe = this.objIframe; if (isIE) {
 tempIframe.attachEvent('onload', (function () {
 var tempPopDiv = _instance.objWindow.document.getElementById(_instance.iframeid+'_div'); if (tempPopDiv) {
 tempPopDiv.style.visibility = 'visible'; tempPopDiv = null; }
 _instance.adjustIframeHeight(); })); tempIframe.attachEvent('onfocus', (function () {_instance.adjustIframeIndex()})); } else {
 tempIframe.addEventListener('load', (function () {
 var tempPopDiv = _instance.objWindow.document.getElementById(_instance.iframeid+'_div'); if (tempPopDiv) {
 tempPopDiv.style.visibility = 'visible'; tempPopDiv = null; }
 _instance.adjustIframeHeight(); }), false); }
 },

 adjustIframeIndex : function () {
 this.objWindow.document.getElementById(this.iframeid+'_div').style.zIndex = this.zIndex + this.objWindow._iframeIndex + 1; this.objWindow._iframeIndex++; },

 adjustIframeHeight : function () {
 try {
 if (this.objLoadingDiv) {
 var objTemp = this.objWindow.document.createElement('div'); objTemp.appendChild(this.objLoadingDiv); objTemp.innerHTML = ''; objTemp = null; }
 var tempIframe = this.objWindow.document.getElementById(this.iframeid); if (tempIframe) {
 var height = tempIframe.contentWindow.document.body.scrollHeight; tempIframe.style.height = height + "px"; tempIframe.height = height; this.iframeHeight = height; if (!this.locationFlag) {
 this.locationIframeY(); }
 }
 } catch (e) {
 
 return; } finally {
 try {
 
 this.objPopDiv = null; this.objIframe = null; this.objLoadingDiv = null; this.objMask = null; } catch (e) {
 return; }
 }
 },

 locationIframeY : function () {
 var containerHeight; var offsetY; containerHeight = (this.objIframeContainer)?this.objIframeContainer.offsetHeight:this.objWindow.document.documentElement.clientHeight; var scrollTop = this.objWindow.document.body.scrollTop + this.objWindow.document.documentElement.scrollTop; offsetY = scrollTop + Math.ceil((containerHeight - this.objPopDiv.offsetHeight)/2); if (offsetY < (scrollTop + 50)) {
 offsetY = scrollTop + 50; }
 this.objPopDiv.style.top = offsetY + 'px'; this.locationFlag = true; },

 locationIframeX : function () {
 var containerWidth; var offsetX; 
 containerWidth = (this.objIframeContainer)?this.objIframeContainer.offsetWidth:this.locationWidth; offsetX = Math.ceil((containerWidth - this.objPopDiv.offsetWidth)/2) - 25; this.objPopDiv.style.left = offsetX + 'px'; },

 createMask : function () {
 this.objMask = this.objWindow.document.createElement("div"); this.objMask.setAttribute("id", this.maskid); this.objMask.style.position = 'absolute'; this.objMask.style.zIndex = this.zIndex; this.objMask.style.backgroundColor = this.objMaskColor; this.objMask.style.left = "0"; this.objMask.style.top = "0"; this.objMask.style.width = "100%"; if (navigator.appName.indexOf("Microsoft")!=-1) {
 this.objMask.style.filter = "alpha(opacity=50)"; } else {
 this.objMask.style.MozOpacity = "0.5"; }
 this.objWindow.document.body.appendChild(this.objMask); 
 var maskHeight = this.objWindow.document.body.scrollHeight; this.objMask.style.height = maskHeight+"px"; },

 createLoading : function () {
 this.objLoadingDiv = this.objWindow.document.createElement("div"); this.objLoadingDiv.setAttribute("id", 'loading'); this.objLoadingDiv.style.position = 'absolute'; this.objLoadingDiv.style.zIndex = this.zIndex + this.objWindow._iframeIndex + 1; 
 this.objLoadingDiv.style.background = "url(http://img0.cyworld.com.cn/images/mycy/loading.gif) no-repeat -16px -60px"; this.objLoadingDiv.style.width = '304px'; this.objLoadingDiv.style.height = '64px'; var offsetX = Math.ceil((this.locationWidth - 326)/2) - 25; this.objLoadingDiv.style.left = offsetX + 'px'; var scrollTop = (this.objWindow.document.body.scrollTop > 0)?this.objWindow.document.body.scrollTop:this.objWindow.document.documentElement.scrollTop; var offsetY = scrollTop + Math.ceil((window.screen.availHeight - 228)/2) - 25; this.objLoadingDiv.style.top = offsetY + 'px'; this.objWindow.document.body.appendChild(this.objLoadingDiv); },

 closeIframe : function (iframeid, maskid, strWindow, url, strRegion) {
 if (iframeid == undefined) {
 alert('popDivid must be not null!'); }
 var objIframe = ((strWindow)?eval(strWindow):eval('window')).document.getElementById((iframeid?iframeid:'iframe_layer')); var objPopDiv = ((strWindow)?eval(strWindow):eval('window')).document.getElementById((iframeid?iframeid:'iframe_layer') + '_div'); var objMask = ((strWindow)?eval(strWindow):eval('window')).document.getElementById((maskid?maskid:'iframe_mask')); var objLoadingDiv = ((strWindow)?eval(strWindow):eval('window')).document.getElementById('loading'); var objHidden = ((strWindow)?eval(strWindow):eval('window')).document.getElementById('hidden_'+iframeid); try {
 
 if (objHidden) {
 objHidden.focus(); }

 if (objIframe.contentWindow.autoStart != undefined) {
 objIframe.contentWindow.clearAuto(); objIframe.contentWindow.closeDialogue(); }

 if (url != undefined && url) {
 ((strRegion)?eval(strRegion):eval('window')).document.location.replace(url); }
 } catch (e) {
 
 return ; } finally {
 try {
 if (isIE) {
 objIframe.onload = function () {}; objIframe.onfocus = function () {}; objPopDiv.onmousemove = function () {}; objPopDiv.onmousedown = function () {}; objPopDiv.onmouseup = function () {}; }

 objPopDiv.style.display = 'none'; var objTemp = ((strWindow)?eval(strWindow):eval('window')).document.createElement('div'); objTemp.appendChild(objPopDiv); if (objMask) {
 objTemp.appendChild(objMask); objMask = null; }
 if (objLoadingDiv) {
 objTemp.appendChild(objLoadingDiv); objLoadingDiv = null; }
 objTemp.innerHTML = '';
 objTemp = null; objIframe = null; objPopDiv = null; objHidden = null; } catch (e) {
 return; }
 }
 },

 isExist : function () {
 if (this.objWindow.document.getElementById(this.iframeid)) {
 this.objIframe = this.objWindow.document.getElementById(this.iframeid); this.objPopDiv = this.objWindow.document.getElementById(this.iframeid + '_div'); return true; } else {
 return false; }
 },

 changeHeaderInfo : function (headerInfo) {
 var objHeaderInfo = document.getElementById(this.iframeid + '_header_info'); if (objHeaderInfo) {
 objHeaderInfo.innerHTML = hex2bin(headerInfo); objHeaderInfo = null; }
 }
}


var iframeLayerMode = {

 getModeWidth : function (modeType, modeNum, basicWidth) {
 var width = 0; switch (modeType) {
 case 1:
 if (basicWidth && modeNum) {
 width = basicWidth + 66; } else {
 width = basicWidth; }
 break; default:
 width = 0; break; }
 return width; },
 
 getIframeWidthByMode : function (modeType, modeNum, basicWidth) {
 var width = 0; switch (modeType) {
 case 1:
 if (basicWidth && modeNum) {
 width = basicWidth - 66; } else {
 width = basicWidth; }
 break; default:
 width = 0; break; }
 return width; },

 getModeClass : function (modeType, modeNum) {
 var strClassName = ''; switch (modeType) {
 case 1:
 if (modeNum) {
 strClassName = 'spoor_box_450'; }
 break; case 2:
 case 3:
 if (modeNum) {
 strClassName = 'map_gray_box' + modeNum; }
 break; default:
 strClassName = ''; break; }
 return strClassName; },

 getModeHTML : function (iframeid, type, num, headerInfo, useDrag) {
 var strHTML = ''; var strDragAction = ''; if (useDrag) {
 if (isIE) {
 strDragAction = "onmousedown=\"iframeLayerDrag.startDrag('" + iframeid + "_div')\" onmousemove=\"iframeLayerDrag.dragging()\" onmouseup=\"iframeLayerDrag.stopDrag()\""; } else {
 strDragAction = "onmousedown=\"iframeLayerDrag.startDrag('" + iframeid + "_div')\" "; }
 }
 switch (type) {
 case 1:
 if (num) {
 strHTML = " \
 <div class=\"spoor_title_4502\" id=\""+ iframeid + "_header\" " + strDragAction + "> \
 <input id=\"hidden_" + iframeid + "\" class=\"focus\" type=\"text\" /> \
 <div class=\"titl_text2\"><span class=\"b\" id=\""+ iframeid + "_header_info\">" + headerInfo + "</span></div> \
 <div class=\"titl_icon2\"><a href=\"#\" id=\"close_link_" + iframeid + "\" onclick=\"iframeLayer.prototype.closeIframe('" + iframeid + "');return false;\" class=\"button_close_or\" title=\"关闭\"></a></div> \
 </div> \
 <div class=\"spoor_body_4502\" id=\"" + iframeid + "_body\"></div> \
 "; }
 break; case 2:
 strHTML = " \
 <div class=\"ring03header\" id=\""+ iframeid + "_header\" " + strDragAction + "> \
 <div class=\"west\"><input id=\"hidden_" + iframeid + "\" class=\"focus\" type=\"text\" /></div> \
 <div class=\"east\"> \
 <div class=\"button_block\"><a href=\"#\" class=\"close_blue\" id=\"close_link_" + iframeid + "\" onclick=\"iframeLayer.prototype.closeIframe('" + iframeid + "');return false;\"></a></div> \
 </div> \
 </div> \
 <div class=\"ring03body\"> \
 <div class=\"ring03wrap after\" id=\"" + iframeid + "_body\"> \
 </div> \
 </div> \
 <div class=\"ring03footer\"> \
 <div class=\"west\"></div> \
 <div class=\"east\"></div> \
 </div> \
 "; break; case 3:
 if (num) {
 var strHTML = " \
 <div class=\"boxheader\" id=\""+ iframeid + "_header\" " + strDragAction + ">"; if (headerInfo != undefined && headerInfo != '') {
 strHTML += "<div class=\"title\"><span class=\"font12 b\" id=\""+ iframeid + "_header_info\">你正在和" + hex2bin(headerInfo) + "交谈</span></div>"; } else {
 strHTML += "<div class=\"drag floatleft\"></div>"; }
 strHTML += "<input id=\"hidden_" + iframeid + "\" class=\"focus\" type=\"text\" /><div class=\"link\"><a id=\"close_link_" + iframeid + "\" onclick=\"iframeLayer.prototype.closeIframe('" + iframeid + "');return false;\" class=\"label30_close\" href=\"#\" title=\"关闭\"></a></div> \
 </div> \
 <div class=\"boxbody\" id=\"" + iframeid + "_body\"></div> \
 <div class=\"boxfooter\"></div> \
 "; }
 break; default:
 strHTML = ""; break; }
 return strHTML; }
}


var iframeLayerDrag = {
 down : null,
 dragStartX : null,
 dragStartY : null,
 headObj : null,
 dragObj : null,

 getEvent : function () {
 if (isIE) {
 return window.event; }
 func=iframeLayerDrag.getEvent.caller; while(func!=null){
 var arg0=func.arguments[0]; if(arg0){
 if((arg0.constructor==Event || arg0.constructor ==MouseEvent)
 || (typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation)){
 return arg0; }
 }
 func=func.caller; }
 return null; },

 startDrag : function (id) {
 e = iframeLayerDrag.getEvent(); var scrollTop = (document.body.scrollTop > 0)?document.body.scrollTop:document.documentElement.scrollTop; iframeLayerDrag.dragObj = document.getElementById(id); if (isIE) {
 iframeLayerDrag.headObj = e.srcElement; if (iframeLayerDrag.headObj) {
 iframeLayerDrag.headObj.setCapture(); iframeLayerDrag.headObj.style.cursor="move"; }
 } else {
 window.addEventListener('mousemove', iframeLayerDrag.dragging, false); window.addEventListener('mouseup', iframeLayerDrag.stopDrag, false); }
 iframeLayerDrag.down = true; e.cancelBubble = false; iframeLayerDrag.dragStartX = e.clientX; iframeLayerDrag.dragStartY = e.clientY + scrollTop; },

 dragging : function () {
 e = iframeLayerDrag.getEvent(); var scrollTop = (document.body.scrollTop > 0)?document.body.scrollTop:document.documentElement.scrollTop; if (iframeLayerDrag.down && iframeLayerDrag.dragObj) {
 var dragEndY = e.clientY + scrollTop; var dragEndX = e.clientX; if (dragEndX < iframeLayerDrag.dragStartX) {
 iframeLayerDrag.dragObj.style.left = (parseInt(iframeLayerDrag.dragObj.style.left) - Math.abs(iframeLayerDrag.dragStartX - dragEndX)) + 'px'; } else {
 iframeLayerDrag.dragObj.style.left = (parseInt(iframeLayerDrag.dragObj.style.left) + Math.abs(iframeLayerDrag.dragStartX - dragEndX)) + 'px'; }
 if (dragEndY < iframeLayerDrag.dragStartY) {
 if (dragEndY <= 0) {
 iframeLayerDrag.dragObj.style.top = 0; } else {
 iframeLayerDrag.dragObj.style.top = (parseInt(iframeLayerDrag.dragObj.style.top) - Math.abs(iframeLayerDrag.dragStartY - dragEndY)) + 'px'; }
 } else {
 iframeLayerDrag.dragObj.style.top = (parseInt(iframeLayerDrag.dragObj.style.top) + Math.abs(iframeLayerDrag.dragStartY - dragEndY)) + 'px'; }
 iframeLayerDrag.dragStartX = dragEndX; iframeLayerDrag.dragStartY = dragEndY; }

 },

 stopDrag : function () {
 e = iframeLayerDrag.getEvent(); iframeLayerDrag.down = false; if (isIE) {
 if (iframeLayerDrag.headObj) {
 iframeLayerDrag.headObj.style.cursor="default"; iframeLayerDrag.headObj.releaseCapture(); iframeLayerDrag.headObj = null; }
 } else {
 window.removeEventListener('mousemove', iframeLayerDrag.dragging, false); window.removeEventListener('mouseup', iframeLayerDrag.stopDrag, false); }
 iframeLayerDrag.dragObj = null; e = null; }
}

var iframeLayerTool = {
 
 openIframeLayer : function (id, url, width, objParam, title, modeNum, modeType, fix, advanceLoad) {
 _iframeLayer = new iframeLayer('top'); if (objParam != undefined && typeof(objParam) == 'object') {
 _iframeLayer.setParam(objParam); } 
 _iframeLayer.setIframeid(id); _iframeLayer.setSubmitUrl(url); _iframeLayer.setIframeWidth(
 iframeLayerMode.getIframeWidthByMode(
 (modeType != undefined && modeType > 0) ? modeType : 1, 
 (modeNum != undefined) ? modeNum : 0,
 width
 )
 ); if (modeNum != undefined && modeNum) {
 _iframeLayer.setUseMode(modeNum); }
 if (modeType != undefined && modeType > 0) {
 _iframeLayer.setModeType(modeType); }
 if (fix != undefined && fix == false) {
 if (advanceLoad != undefined && typeof(advanceLoad) == 'boolean') {
 _iframeLayer.setAdvanceLoad(advanceLoad); }
 } else {
 if (title != undefined && title) {
 _iframeLayer.setHeaderInfo(title); }
 _iframeLayer.setLocationWidth(window.screen.availWidth); _iframeLayer.setUseDrag(false); _iframeLayer.setDisplayMask(true); }
 _iframeLayer.setSubmitMethod('GET'); _iframeLayer.setDisplayType(true); _iframeLayer.doSubmit(); _iframeLayer = null; },
 
 
 closeIframeLayer : function (iframeid) {
 if (iframeid != undefined) {
 top.iframeLayer.prototype.closeIframe(iframeid); } else {
 var _iframeid = window.frameElement.id; top.iframeLayer.prototype.closeIframe(_iframeid); }
 }
}




function closeIframeFromParent(iframeid, maskid) {
 var objIframe = parent.document.getElementById((iframeid?iframeid:'iframe_layer')); var objMask = parent.document.getElementById((maskid?maskid:'iframe_mask')); objIframe.parentNode.removeChild(objIframe); if (objMask) {
 objMask.parentNode.removeChild(objMask); }
}
function closeIframeAndOpenAnother(iframeid, func, arrData) {
 var strParams = ''; iframeLayer.prototype.closeIframe(iframeid); if (arrData != undefined) {
 strParams = arrData[0]; for (var i = 1;i < arrData.length; i++) {
 strParams += ',' + arrData[i]; }
 }
 eval(func+"("+strParams+")");}

function initIframe(id, minHeight){
 var ht; if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {
 ht = document.documentElement.offsetHeight; } else {
 ht = document.documentElement.scrollHeight; }
 if (ht < minHeight) {
 ht = minHeight; }
 
 var objIframe = parent.document.getElementById(id); if (objIframe) {
 objIframe.style.height = ht + 'px'; objIframe = null; }
}
function resizeIframeSelf(obj){
 var ht; if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {
 ht = obj.contentWindow.document.documentElement.offsetHeight; } else {
 ht = obj.contentWindow.document.documentElement.scrollHeight; }
 
 obj.style.height = ht + 'px';}
function reloadIframe(id,iframe_src) {
 var objIframe = document.getElementById(id); if (objIframe) {
 if(iframe_src){
 objIframe.src = iframe_src; }else{
 objIframe.contentWindow.location.reload(); }
 }
}/* [2010-02-09 14:30:37] 0.00432205200195 */