var pageSupport = {EMBEDDED : 0,URL : 1,PUMPED : 2,
IVU_IFRM_PREFIX : "ivuFrm_" ,IVU_IFRM_OBJ_PREFIX : "ivuFrmObj_",IVU_FORM_OBJ_PREFIX : "ivuFormObj_",IVU_XMP_PREFIX : "ivuXmp_",IVU_IFRM_SPAN_PREFIX : "ivuFrmSpan_",TRAY_BOTTOM_BORDER_PREFIX : "trayBottomBorder_",TRAY_COVER_PREFIX : "trayCover_",
TIME_OUT_CACHE_CONTENT	: 3,TIME_OUT_NO_CACHE_CONTENT	: 4 ,TIME_OUT_CACHE_CONTENT_CACHE_REF	: 5,TIME_OUT_NO_CACHE_CONTENT_CACHE_REF	: 6,
iviews: new Array(),iviewsBank: new Array(),iviewsIDs: new Array(),menuOptions: new Array(),pageIds: new Array(),pageId: "",isLoaded:false,IE5AutoHeightMaxLoops:360, 

workArea: null
}
function isNN7()
{if (typeof EPCM != "undefined")
{return (EPCM.getUAType() == EPCM.MOZILLA || EPCM.getUAType() == EPCM.NETSCAPE) && (EPCM.getUAVersion() <= 5 || EPCM.getUAVersion() >= 7);}
else
{return (navigator.appName == "Netscape");}
}
pageSupport._isLightPage = function() {return true;}
pageSupport._addIViewBank = function(ivuPageId,ivuBank){ivuBank.setIvuId(this._getIvuId(ivuPageId));this.iviewsBank[ivuPageId] = ivuBank;}
pageSupport._getIViewBank = function(ivuPageId){return this.iviewsBank[ivuPageId];}
pageSupport._addIvuPageId = function(ivuId,ivuPageID)
{this.iviews[this.iviews.length] = ivuPageID;this.iviewsIDs[ivuId] = ivuPageID;}
pageSupport._getIvuPageId = function(ivuId)
{return this.iviewsIDs[ivuId];}
pageSupport._getIvuId = function(ivuPageId)
{for(var i in this.iviewsIDs)
{if(this.iviewsIDs[i] == ivuPageId)
return i;}
return null;}
pageSupport.addPageId = function(pageId , pageIndex)
{this.pageIds[pageIndex] = pageId;}
pageSupport.ivuRecalcAllTrays = function()
{this.adjustFullPageIViews();}
pageSupport.adjustFullPageIViews = function()
{pageSupport._adjustFullPageIViews();}
pageSupport._culcElementOffsetTopBody = function(elemObj)
{var offset=0;
while(elemObj != document.body)
{offset += elemObj.offsetTop;elemObj = elemObj.offsetParent;}
return offset;}
pageSupport._adjustFullPageIViews = function()
{
var docIFrames = document.getElementsByTagName("IFRAME");var docIFramesLen = docIFrames.length;var currIFrame;var minIViewHeight = 80;var bodyHeight;var reqHeight = minIViewHeight;var currIFrameId;
if (navigator.appName == "Microsoft Internet Explorer") {bodyHeight = document.body.clientHeight - document.getElementById("inner_page_div").parentElement.offsetTop;if(bodyHeight == 0)
{setTimeout("pageSupport._adjustFullPageIViews()" , 50);return;}
}
else {bodyHeight = window.innerHeight;}
for(var i=0 ; i<docIFramesLen ; i++)
{currIFrame = docIFrames[i];currIFrameId = currIFrame.getAttribute("id");if(currIFrame.getAttribute("fullPage") == "true")
{if(currIFrame.getAttribute("hasTray") == "true")

{var trayBotIdPref = pageSupport.TRAY_BOTTOM_BORDER_PREFIX + currIFrameId;var trayBotEnd = document.getElementById("end_" + trayBotIdPref);var trayBotStart;var trayBotEndOffsetHeight = pageSupport._culcElementOffsetTopBody(trayBotEnd);var trayBotStartOffsetHeight;var trayBotHeight;
if (navigator.appName == "Microsoft Internet Explorer")
{if(trayBotEndOffsetHeight > 0) 

{reqHeight = bodyHeight - pageSupport._culcElementOffsetTopBody(trayBotEnd) + currIFrame.clientHeight;}
else 

{reqHeight = bodyHeight - pageSupport._culcElementOffsetTopBody(currIFrame);}
}
else if (isNN7())
{trayBotStart = document.getElementById("start_" + trayBotIdPref);trayBotStartOffsetHeight = pageSupport._culcElementOffsetTopBody(trayBotStart);trayBotHeight = trayBotEndOffsetHeight - trayBotStartOffsetHeight;reqHeight = bodyHeight - pageSupport._culcElementOffsetTopBody(currIFrame) - trayBotHeight;}
}
else

{reqHeight = bodyHeight - pageSupport._culcElementOffsetTopBody(currIFrame);}
if(reqHeight > minIViewHeight)
{if (navigator.appName == "Microsoft Internet Explorer") {currIFrame.style.pixelHeight = reqHeight - 3;}
else if (isNN7())
{currIFrame.height = reqHeight - 8;}
}
}
}
}
pageSupport.getIvuFrameObj = function(ivuId)
{try
{var ivuPageId = this._getIvuPageId(ivuId);var ivuIsolation = this._getIViewBank(ivuPageId).getIsolation();if((ivuIsolation == this.URL) || (ivuIsolation == this.PUMPED))
{var iframeId = pageSupport.IVU_IFRM_PREFIX + ivuPageId;return document.getElementById(iframeId);}
else
{return null;}
}
catch(e){return null;}
}
pageSupport.embedTimeoutMessage = function(ivuIsolation,includeStatus,ivuPageId , reloadUrl)
{
var ivuID = ivuPageId;var ivuBank = pageSupport._getIViewBank(ivuPageId);if(ivuBank)
{ivuID = ivuBank.getIvuId();}
else
{ivuBank = pageSupport._getIViewBank(pageSupport._getIvuPageId(ivuID));
}
if(reloadUrl)
{ivuBank.setReloadUrl(reloadUrl);}
}
pageSupport.ivuAdjustHeight = function(ivuId , height , checkMode)
{var ivuFrameObj = pageSupport.getIvuFrameObj(ivuId); 

if(ivuFrameObj )
{pageSupport.adjustHeight(ivuFrameObj , height , checkMode); 

}
}
pageSupport.adjustHeight = function(ivuFrameObj , theHeight ,checkMode , phase) {
try{
if(! ivuFrameObj)
return;if(! phase)
phase = 0;
if(phase > 60)
return;if(typeof(checkMode) == "undefined")
checkMode = true;var ivuId = pageSupport._getIvuIdByIframe(ivuFrameObj); 

var ivuBankObj = pageSupport._getIViewBank(pageSupport._getIvuPageId(ivuId)); 

if(ivuBankObj.getToogle() == 0)
return;
if(! ivuBankObj.isLoaded())
return true;
if(checkMode)
{var minAutoHeight = ivuFrameObj.getAttribute("minAutoHeight");
if((minAutoHeight == null) || (minAutoHeight == ""))
return;}
var ivuFrameWindow = pageSupport._getContentWindow(ivuFrameObj); 

if (navigator.appName != "Netscape")
{var dom = ivuFrameWindow.document.domain;}
var height = theHeight;if(! height)
height = pageSupport._getHeight( ivuFrameWindow ); 

if (height > 0) {
var minAutoHeight = ivuFrameObj.getAttribute("minAutoHeight");var maxAutoHeight = ivuFrameObj.getAttribute("maxAutoHeight");
if((minAutoHeight != "") && (minAutoHeight != null)){height=Math.max(height,minAutoHeight);}
if((maxAutoHeight != "") && (maxAutoHeight != null)){height=Math.min(height,maxAutoHeight);}
if(pageSupport._applyHeight(ivuFrameObj , height)) 

{setTimeout("pageSupport.adjustHeight(document.getElementById('"+ivuFrameObj.id+"'),"+theHeight+","+checkMode+","+(phase+1)+")" , 50);}
}
else
{setTimeout("pageSupport.adjustHeight(document.getElementById('"+ivuFrameObj.id+"'),"+theHeight+","+checkMode+","+(phase+1)+")" , 50);}
}
catch( ex ) {
return false;}
}
pageSupport._getIvuIdByIframe = function(iframeObj)
{try
{if(iframeObj != null)
{var ivuPageId = iframeObj.id.substring(this.IVU_IFRM_PREFIX.length);var ivuBank = pageSupport._getIViewBank(ivuPageId);return ivuBank.getIvuId();}
else
{return "";}
}
catch(e){return "";}
}
pageSupport._getContentWindow = function ( ivuFrameObj) {
try
{
return window.frames[ivuFrameObj.id];
}
catch(e){return null;}
}
pageSupport._getHeight = function( wndRef ) {var result = 0;try {if (navigator.appName == "Microsoft Internet Explorer") {var loBody = wndRef.document.body;result = loBody.scrollHeight +
loBody.offsetHeight -
loBody.clientHeight;
} else if (isNN7()) {var loBody = wndRef.document.body;result = loBody.scrollHeight;}
} catch (e) {result = 0;}
return result;}
pageSupport._applyHeight = function(ivuFrameObj , height)
{var ivuId = pageSupport._getIvuIdByIframe(ivuFrameObj); 

if (navigator.appName == "Microsoft Internet Explorer") {var oldHeight = ivuFrameObj.style.pixelHeight;if(oldHeight == height)
{return false;}
ivuFrameObj.style.pixelHeight = height;return true;}
else if (isNN7())
{var ivuBankObj = pageSupport._getIViewBank(pageSupport._getIvuPageId(ivuId));if(ivuBankObj.isLoaded())
{ivuFrameObj.height = height;ivuFrameObj.style.height = height;pageSupport.ivuRecalcTray(ivuId); 

}
return false;}
}
pageSupport.ivuRecalcTray = function(ivuId)
{var ivuPageId = this._getIvuPageId(ivuId); 

this._recalcTray(ivuPageId); 

}
pageSupport._recalcTray = function(ivuPageId)
{var ivuBankObj = pageSupport._getIViewBank(ivuPageId);var trayId = ivuBankObj.getTrayId();if( navigator.appName != "Microsoft Internet Explorer")
{if (typeof sapUrMapi_Tray_create != "undefined") {sapUrMapi_Tray_create(trayId,false,false,null);}
}
}
function iviewBank(ivuReloadUrl,ivuRefreshUrl,ivuIsolation,ivuToogle, pageIndex, ivuParams, ivuMethod){var mm_IvuId = "";var mm_refreshUrl = ivuRefreshUrl;var mm_reloadUrl = ivuReloadUrl;var mm_isolation = ivuIsolation;var mm_toogle = ivuToogle;var mm_initialToogle = ivuToogle;var mm_method = ivuMethod;
var mm_remove = false;var mm_trayId = "";var mm_hovermenuId = "";var mm_src = null;var mm_isStateChanged = false;var mm_pageIndex = pageIndex;var mm_params = ivuParams;
this.getIvuId = getIvuId;this.setIvuId = setIvuId;this.getRefreshUrl = getRefreshUrl;this.getReloadUrl = getReloadUrl;this.setReloadUrl = setReloadUrl;this.getIsolation = getIsolation;this.getMethod = getMethod;
this.getInitialToogle = getInitialToogle;this.getToogle = getToogle;this.setToogle = setToogle;
this.getRemove = getRemove;this.setRemove = setRemove;this.setHtmlbIds = setHtmlbIds;this.getTrayId = getTrayId;this.getHoverMenuId = getHoverMenuId;this.setSrc = setSrc;this.getSrc = getSrc;this.isStateChanged = isStateChanged;this.isLoaded = isLoaded;this.getPageIndex = getPageIndex;this.getParams = getParams;
function getToogle()
{return mm_toogle;}
function setToogle()
{mm_toogle = (mm_toogle+1)%2;mm_isStateChanged = true;}
function getInitialToogle()
{return mm_initialToogle;}
function setIvuId(id)
{return mm_IvuId = id;}
function getIvuId()
{return mm_IvuId;}
function getRefreshUrl()
{return mm_refreshUrl;}
function getReloadUrl()
{return mm_reloadUrl;}
function setReloadUrl(url)
{mm_reloadUrl = url;}
function getIsolation()
{return mm_isolation;}
function getMethod()
{return mm_method;}
function getRemove()
{return mm_remove;}
function setRemove()
{mm_remove = true;}
function setHtmlbIds(trayId , hoverMenuId)
{mm_trayId = trayId;mm_hovermenuId = hoverMenuId;}
function getTrayId()
{return mm_trayId;}
function getHoverMenuId()
{return mm_hovermenuId;}
function setSrc(src)
{mm_src = src;}
function getSrc()
{return mm_src;}
function isStateChanged()
{return mm_isStateChanged;}
function isLoaded()
{if(mm_src == null)
return true;if(mm_isStateChanged == true)
return true;return false;}
function getPageIndex()
{return mm_pageIndex;}
function getParams()
{return mm_params;}
}