





//(C) Copyright IBM Corp. 2002, 2003, 2004. All Rights Reserved
//
// Assyncronos
//
var asynchContextMenuDebug=-1;var asynchContextMenuMouseOverIndicator="";var portletIdMap=new Object();function asynchContextMenuOnMouseClickHandler(uniqueID, isLTR, urlToMenuContents, menuBorderStyle, menuTableStyle, menuItemStyle, menuItemSelectedStyle, emptyMenuText, loadingImage)
{
var menuID="contextMenu_" + uniqueID;var menu=getContextMenu(menuID);if (menu == null)
{
asynchContextMenu_menuCurrentlyLoading=uniqueID;if (loadingImage)
{
setLoadingImage(loadingImage);}menu=createContextMenu(menuID, isLTR, null, menuBorderStyle, menuTableStyle, emptyMenuText);loadAsynchContextMenu(uniqueID, urlToMenuContents, isLTR, menuItemStyle, menuItemSelectedStyle, '', true);}else
{
if (asynchContextMenu_menuCurrentlyLoading == uniqueID)
{
return;}showContextMenu(menuID, document.getElementById(uniqueID));};};var asynchContextMenu_originalMenuImgElementSrc;function setLoadingImage(img)
{
asynchContextMenu_originalMenuImgElementSrc=document.getElementById(asynchContextMenu_menuCurrentlyLoading + "_img").src;document.getElementById(asynchContextMenu_menuCurrentlyLoading + "_img").src=img;};function clearLoadingImage()
{
document.getElementById(asynchContextMenu_menuCurrentlyLoading + "_img").src=asynchContextMenu_originalMenuImgElementSrc;};function loadAsynchContextMenu(uniqueID, url, isLTR, menuItemStyle, menuItemSelectedStyle, emptyMenuText, showMenu, onMenuAffordanceShowHandler)
{
asynchDebug('ENTRY loadAsynchContextMenu p1=' + uniqueID + '; p2=' + url + '; p3=' + isLTR + '; p4=' + isLTR);var menuID="contextMenu_" + uniqueID;var dialogTag=null;var ID=uniqueID + '_DIV';if (document.getElementById(ID) != null)
{
closeMenu(ID);return;}dialogTag=document.createElement("DIV");dialogTag.style.position="absolute";if (asynchContextMenuDebug < 2)
{
dialogTag.style.left="0px";dialogTag.style.top="-100px";dialogTag.style.visibility="hidden";}if (asynchContextMenuDebug >= 2 || asynchContextMenuDebug == 999)
{
dialogTag.style.left="100px";dialogTag.style.top="100px";dialogTag.style.visibility="visible";}dialogTag.id=ID;var styleString='null';if (menuItemStyle != null)
{
styleString="'" + menuItemStyle + "'";}if (menuItemSelectedStyle != null)
{
styleString=styleString + ", '" + menuItemSelectedStyle + "'";}else
{
styleString=styleString + ", null";}dialogTag.innerHTML='<iframe id="' + menuID + '" name="' + ID + '_IFRAME" src="' + url + '" onload="buildAndDisplayMenu(this.id, this.name, ' + styleString + ', ' + showMenu + ' , \''+ onMenuAffordanceShowHandler + '\'); return false;" ></iframe>';document.body.appendChild(dialogTag);asynchDebug('EXIT createDynamicElements');};function buildAndDisplayMenu(menuID, iframeID, menuItemStyle, menuItemSelectedStyle, showMenu, onMenuAffordanceShowHandler)
{
asynchDebug('ENTRY buildAndDisplayMenu p1=' + menuID + '; p2=' + iframeID + '; p3=' + showMenu + '; p4=' + onMenuAffordanceShowHandler);var menu=getContextMenu(menuID);clearLoadingImage();asynchContextMenu_menuCurrentlyLoading=null;if (menu == null)
{
return false;}index=iframeID.indexOf("_IFRAME");var divID=iframeID.substring(0, index);index2=divID.indexOf("_DIV");var uniqueID=divID.substring(0, index2);asynchDebug('divID=' + divID);asynchDebug('uniqueID=' + uniqueID);var frame, c=-1, done=false;while ((c + 1) < window.frames.length && !done)
{
c=c+1;try
{
done=(window.frames[c].name == iframeID);}catch (e)
{
};};if (window.frames[c].getMenuContents)
{
contents=window.frames[c].getMenuContents();}else
{
return false;};for (i=0; i < contents.length; i=i+3)
{
asynchDebug2('Adding item: ' + contents[i+1]);asynchDebug2('URL: ' + contents[i]);if (contents[i])
{
asynchDebug2('url length: ' + contents[i].length);}asynchDebug2('icon: ' + contents[i+2]);if (contents[i] && contents[i].length != 0)
{
var icon=null;if (contents[i+2] && contents[i+2].length != 0)
{
icon=contents[i+2];}menu.add(new UilMenuItem(contents[i+1], true, '', contents[i], null, icon, null, menuItemStyle, menuItemSelectedStyle));}};var target=document.getElementById(uniqueID);asynchDebug('EXIT buildAndDisplayMenu');if (showMenu == null || showMenu == true)
{
return showContextMenu(menuID, target);}};function createDynamicElements(uniqueID, url, menuID, menuItemStyle, menuItemSelectedStyle)
{
asynchDebug('ENTRY createDynamicElements p1=' + uniqueID + '; p2=' + url + '; p3=' + menuID);var dialogTag=null;var ID=uniqueID + '_DIV';if (document.getElementById(ID) != null)
{
closeMenu(ID);return;}dialogTag=document.createElement("DIV");dialogTag.style.position="absolute";if (asynchContextMenuDebug < 2)
{
dialogTag.style.left="0px";dialogTag.style.top="-100px";dialogTag.style.visibility="hidden";}if (asynchContextMenuDebug >= 2 || asynchContextMenuDebug == 999)
{
dialogTag.style.left="100px";dialogTag.style.top="100px";dialogTag.style.visibility="visible";}dialogTag.id=ID;var styleString='null, null';if (menuItemStyle != null)
{
styleString="'" + menuItemStyle + "'";}if (menuItemSelectedStyle != null)
{
styleString=styleString + ", '" + menuItemSelectedStyle + "'";}else
{
styleString=styleString + ", null";}dialogTag.innerHTML='<iframe id="' + menuID + '" name="' + ID + '_IFRAME" src="' + url + '" onload="buildAndDisplayMenu(this.id, this.name, ' + styleString + '); return false;" ></iframe>';document.body.appendChild(dialogTag);asynchDebug('EXIT createDynamicElements');};function asynchDebug(str)
{
if (asynchContextMenuDebug >= 1 && asynchContextMenuDebug != 999)
{
alert(str);}};function asynchDebug2(str)
{
if (asynchContextMenuDebug >= 0 && asynchContextMenuDebug != 999)
{
alert(str) ;}};function asynchDoFormSubmit(url){
var formElem=document.createElement("form");document.body.appendChild(formElem);formElem.setAttribute("method", "GET");var delimLocation=url.indexOf("?");if (delimLocation >= 0) {
var params=url.substring(delimLocation + 1, url.length);url=url.substring(0, delimLocation);var paramArray=params.split("&");for (var i=0; i < paramArray.length; i++) {
var name=paramArray[i].substring(0, paramArray[i].indexOf("="));var value=paramArray[i].substring(paramArray[i].indexOf("=") + 1, paramArray[i].length);var inputElem=document.createElement("input");inputElem.setAttribute("type", "hidden");inputElem.setAttribute("name", name);inputElem.setAttribute("value", value);formElem.appendChild(inputElem);};}formElem.setAttribute("action", url);formElem.submit();};var asynchContextMenu_menuCurrentlyLoading=null;function menuMouseOver(id, selectedImage)
{
if (asynchContextMenu_menuCurrentlyLoading != null)
return;portletIdMap[id]='menu_'+id+'_img';showAffordance(id, selectedImage);};function menuMouseOut(id, disabledImage)
{
if (asynchContextMenu_menuCurrentlyLoading != null)
return;hideAffordance(id , disabledImage);portletIdMap[id]="";};function showAffordance(id, selectedImage)
{
document.getElementById('menu_'+id).style.cursor='pointer';document.getElementById('menu_'+id+'_img').src=selectedImage;};function hideAffordance(id, disabledImage)
{
document.getElementById('menu_'+id).style.cursor='default';document.getElementById('menu_'+id+'_img').src=disabledImage;};function menuMouseOverThinSkin(id, selectedImage)
{
if (asynchContextMenu_menuCurrentlyLoading != null)
return;portletIdMap[id]='menu_'+id+'_img';showAffordanceThinSkin(id, selectedImage);};function menuMouseOutThinSkin(id, disabledImage)
{
if (asynchContextMenu_menuCurrentlyLoading != null)
return;hideAffordanceThinSkin(id , disabledImage);portletIdMap[id]="";};function showAffordanceThinSkin(id, selectedImage)
{
document.getElementById('menu_'+id).style.cursor='pointer';document.getElementById('portletTitleBar_'+id).className='wpsThinSkinContainerBar wpsThinSkinContainerBarBorder';document.getElementById('title_'+id).className='wpsThinSkinDragZoneContainer wpsThinSkinVisible';document.getElementById('menu_'+id+'_img').src=selectedImage;};function hideAffordanceThinSkin(id, disabledImage)
{
document.getElementById('menu_'+id).style.cursor='default';document.getElementById('portletTitleBar_'+id).className='wpsThinSkinContainerBar';document.getElementById('title_'+id).className='wpsThinSkinDragZoneContainer wpsThinSkinInvisible';document.getElementById('menu_'+id+'_img').src=disabledImage;};var onmousedownold_;function closeMenu(id, disabledImage)
{
hideCurrentContextMenu();if (portletIdMap[id] == "")
{
hideAffordance(id, disabledImage);}document.onmousedown=onmousedownold_;};function showPortletMenu(id, portletNoActionsText, isRTL, menuPortletURL, disabledImage, loadingImage)
{
if (portletIdMap[id].indexOf(id) < 0)
return;asynchContextMenuOnMouseClickHandler('menu_'+id,!isRTL,menuPortletURL, null, null, null, null, portletNoActionsText, loadingImage);onmousedownold_=document.onmousedown;document.onmousedown=closeMenu;};function accessibleShowMenu(event , id , portletNoActionsText, isRTL, menuPortletURL, loadingImage)
{
if (event.which == 13)
{
asynchContextMenuOnMouseClickHandler('menu_'+id,!isRTL,menuPortletURL, null, null, null, null, portletNoActionsText, loadingImage);}else
{
return true;};};
//(C) Copyright IBM Corp. 2002, 2003, 2004. All Rights Reserved//
//
// Browser
//
BrowserDimensions.prototype=new Object();BrowserDimensions.prototype.constructor=BrowserDimensions;BrowserDimensions.superclass=null;function BrowserDimensions(){
this.body=document.body;if (this.isStrictDoctype() && !this.isSafari()) {
this.body=document.documentElement;}};BrowserDimensions.prototype.getScrollFromLeft=function(){
return this.body.scrollLeft ;};BrowserDimensions.prototype.getScrollFromTop=function(){
return this.body.scrollTop ;};BrowserDimensions.prototype.getViewableAreaWidth=function(){
return this.body.clientWidth ;};BrowserDimensions.prototype.getViewableAreaHeight=function(){
return this.body.clientHeight ;};BrowserDimensions.prototype.getHTMLElementWidth=function(){
return this.body.scrollWidth ;};BrowserDimensions.prototype.getHTMLElementHeight=function(){
return this.body.scrollHeight ;};BrowserDimensions.prototype.isStrictDoctype=function(){
return (document.compatMode && document.compatMode != "BackCompat");};BrowserDimensions.prototype.isSafari=function(){
return (navigator.userAgent.toLowerCase().indexOf("safari") >= 0);};






  
  	
  
        
