

//-----------------------------------------------------------------------------
function alertMsgs(key,arg0,arg1,arg2,arg3,arg4)
{
myString = new String(errorMsg[key]);

var exp0 = /\{0\}/gi;
var exp1 = /\{1\}/gi;
var exp2 = /\{2\}/gi;
var exp3 = /\{3\}/gi;
var exp4 = /\{4\}/gi;

myString = myString.replace(exp0, arg0);
myString = myString.replace(exp1, arg1);
myString = myString.replace(exp2, arg2);
myString = myString.replace(exp3, arg3);
myString = myString.replace(exp4, arg4);

//alert(key + " : " + myString);                                                // 800WA_WEBCONSOLE149         
alert(key + "\n" + myString);                                                   // 800WA_WEBCONSOLE149 
}

//-----------------------------------------------------------------------------
function trim(str) 
{  if(str.charAt(0) == " ")
  {  str = trim(str.substring(1));
  }
  if (str.charAt(str.length-1) == " ")
  {  str = trim(str.substring(0,str.length-1));
  }
  return str;
}

function alertMsg(key)
{
 //  alert(key + " : " + errorMsg[key]);                                        // 800WA_WEBCONSOLE149
 alert(trim(key) + "\n" + trim(errorMsg[key]));                                 // 800WA_WEBCONSOLE149

}
//-----------------------------------------------------------------------------

function disableKey()
{
if( event.keyCode == 8 &&                                                       // 800WA_WEBCONSOLE357
   (event.srcElement.tagName.toUpperCase() == 'INPUT' &&                        // 800WA_WEBCONSOLE357
   (event.srcElement.type.toUpperCase() == 'TEXT' ||                            // 800WA_WEBCONSOLE357
    event.srcElement.type.toUpperCase() == 'PASSWORD')))                        // 800WA_WEBCONSOLE357
{                                                                               // 800WA_WEBCONSOLE357
if(!event.srcElement.readOnly){                                                 // 800WA_WEBCONSOLE451
event.returnValue = true;                                                       // 800WA_WEBCONSOLE357
}                                                                               // 800WA_WEBCONSOLE451
else{                                                                           // 800WA_WEBCONSOLE451
event.returnValue = false;                                                      // 800WA_WEBCONSOLE451
window.event.keyCode = 505;                                                     // 800WA_WEBCONSOLE451
}                                                                               // 800WA_WEBCONSOLE451
}                                                                               // 800WA_WEBCONSOLE357
else                                                                            // 800WA_WEBCONSOLE357
{                                                                               // 800WA_WEBCONSOLE357
event.returnValue = false;
window.event.keyCode = 505;
}                                                                               // 800WA_WEBCONSOLE357
}

document.oncontextmenu=new Function("return false");
document.ondragstart=new Function("return false");                              // 800WA_WEBCONSOLE136

function disableHotKeys()
{
if (document.all)
{
document.onmousedown=function()
{
var message="";
if(event.button==2)
{
 (message);
 return false;
}
}

document.onkeydown = function ()
	{
		var key_f3 = 114;
		var key_f5 = 116;
		var key_f6 = 117;
		var key_f10 = 121;
		var key_f11 = 122;
		var key_O = 79;
		var key_L = 76;
		var key_S = 83;
		var key_R = 82;
		var key_H = 72;
		var key_E = 69;
		var key_I = 73;
		var key_N = 78;
		var key_Tab = 9;
		var key_Home = 36;
		var key_up = 38;
		var key_left = 37;
		var key_right=39;
		var key_backspace = 8;
		if(event.keyCode == key_f5)                                             // 800WA_WEBCONSOLE207
		{                                                                       // 800WA_WEBCONSOLE207
		disableKey();                                                           // 800WA_WEBCONSOLE207
		}                                                                       // 800WA_WEBCONSOLE207

		if (
				key_f11 == window.event.keyCode ||
				key_f5==event.keyCode ||
				key_f6==event.keyCode ||
				key_f3==event.keyCode ||
				key_backspace == event.keyCode

			)
			{
                //if (event.srcElement.tagName.toUpperCase()!= 'INPUT') {		// 800WA_WEBCONSOLE135 // 800WA_WEBCONSOLE357
                //if ((event.srcElement.type.toUpperCase() != 'TEXT' &&         // 800WA_WEBCONSOLE357
                //    event.srcElement.type.toUpperCase() != 'PASSWORD' &&      // 800WA_WEBCONSOLE357
                //    event.srcElement.tagName.toUpperCase() == 'INPUT')  {     // 800WA_WEBCONSOLE357
                    disableKey();
                //}																// 800WA_WEBCONSOLE135 // 800WA_WEBCONSOLE357
			}

		if(event.ctrlKey)
		{
		   if(
				key_f11 == event.keyCode ||
				key_R ==  event.keyCode ||
				key_f5==window.event.keyCode ||
				key_N == event.keyCode ||
				key_O == event.keyCode ||
				key_L == event.keyCode  ||
				key_f6==event.keyCode ||
				key_Tab==event.keyCode ||
				key_H==event.keyCode ||
				key_E==event.keyCode ||
				key_I==event.keyCode ||
				key_S == event.keyCode
			   )
				{
					disableKey();
				}

			if(event.shiftKey)
			{
				 if(key_f6 == event.keyCode)
				 {
						disableKey();
				 }
				if(event.altKey)
				{
						if(key_f6 == event.keyCode)
						 {
								disableKey();
						 }
				}

			}

		}

		if(event.altKey)
		{
		   if(
				key_Home == event.keyCode ||
				key_up == event.keyCode ||
				key_left == event.keyCode ||
				key_right == event.keyCode
			 )
			 {
						// disableKey();										// 800WA_WEBCONSOLE125
						return false;											// 800WA_WEBCONSOLE125
			 }
		}
		if(event.shiftKey)
		{
				if( key_f10 == event.keyCode)
				 {
						disableKey();
				}
		}
			if(window.event && window.event.keyCode == 505)
			{
				return false;
			}
	}
}
}

disableHotKeys();
//-----------------------------------------------------------------------------

function isEmpty(str)
{
	if(trim(str).length == 0) 
	{
		return true;
	}
	return false;
}
//-----------------------------------------------------------------------------

/**
 * This method to maintain the check box selection after sorting
 * @param r_varType Type of the component.
 * @since 08-00
 */
function setChecked(r_varType) {                                                // 800WA_WEBCONSOLE097
    var l_varFormElements = document.forms[0].elements;                         // 800WA_WEBCONSOLE097
    for(var l_varCount = 0; l_varCount < l_varFormElements.length;              // 800WA_WEBCONSOLE097 
        l_varCount++){                                                          // 800WA_WEBCONSOLE097
	    if(r_varType == l_varFormElements[l_varCount].type) {                   // 800WA_WEBCONSOLE097
		    for(var l_varCnt = 0; l_varCnt < selectedIds.length; l_varCnt++) {  // 800WA_WEBCONSOLE097
			    if(l_varFormElements[l_varCount].value ==                       // 800WA_WEBCONSOLE097
			        selectedIds[l_varCnt]){                                     // 800WA_WEBCONSOLE097
				    l_varFormElements[l_varCount].checked = 'true';             // 800WA_WEBCONSOLE097
			    }                                                               // 800WA_WEBCONSOLE097
		    }                                                                   // 800WA_WEBCONSOLE097
	    }                                                                       // 800WA_WEBCONSOLE097
    }                                                                           // 800WA_WEBCONSOLE097
}                                                                               // 800WA_WEBCONSOLE097


/**
 * This method to load a window or frame with blank page
 * @since 08-00
 */
function setDefaultPage()                                                       // 800WA_WEBCONSOLE186 
{                                                                               // 800WA_WEBCONSOLE186 
parent.frames["hostDetail"].location="jsp/default.html";                        // 800WA_WEBCONSOLE186
}                                                                               // 800WA_WEBCONSOLE186  

/**
 * This method is used to change the color of the link to 'grey'
 * when it is clicked
 * @param r_varMenuId Contains the id of the menu that is clicked.
 * @param r_varMenuArray Contains all the menu ids present in  the screen.
 * @since 08-00
 */
function activeLink(r_varMenuId,r_varMenuArray)
{
	clearAllActiveLink(r_varMenuArray);
	//document.getElementById(r_varMenuId).style.background = 'gray';           // 800WA_WEBCONSOLE445
	document.getElementById(r_varMenuId).style.background = 'white';            // 800WA_WEBCONSOLE445

}

/**
 * This method is used to change the color of the nodes in the tree to 'gray'
 * when it is clicked
 * @param r_varMenuId Contains the id of the menu that is clicked.
 * @param r_varMenuArray Contains all the menu ids present in  the screen.
 * @since 08-00
 */
function activeLinkTree(r_varMenuId,r_varMenuArray)                             // 800WA_WEBCONSOLE445
{                                                                               // 800WA_WEBCONSOLE445
	clearAllActiveLink(r_varMenuArray);                                         // 800WA_WEBCONSOLE445
	document.getElementById(r_varMenuId).style.background = 'gray';             // 800WA_WEBCONSOLE445                                            
}                                                                               // 800WA_WEBCONSOLE445

/**
 * This method is used to change the color of the link to 'white'
 * when the menu is inactive
 * @param r_menuArray Contains all the menu ids present in  the screen.
 * @since 08-00
 */
function clearAllActiveLink(r_varMenuArray)
{
	for(var l_varCount = 0;l_varCount < r_varMenuArray.length; l_varCount++)
	{
		document.getElementById(r_varMenuArray[l_varCount]).style.background="#ffffff";
	}
}
  
/**
 * This method is used to store the properties of the confirmation dialog.      // 800WA_WEBCONSOLE261    
 * @param r_varTitle contains the title of the confirmation dialog.             // 800WA_WEBCONSOLE261
 * @param r_varIcon contains the icon name of the confirmation dialog.          // 800WA_WEBCONSOLE261
 * @param r_varId contains the confirmation id.                                 // 800WA_WEBCONSOLE261
 * @param r_varMessage contains the confirmation message                        // 800WA_WEBCONSOLE261
 * @param r_varOk contains the Ok button value.                                 // 800WA_WEBCONSOLE261
 * @param r_varCancel contains the Cancel Button value.                         // 800WA_WEBCONSOLE261
 * @since 08-00                                                                 // 800WA_WEBCONSOLE261
 */                                                                             // 800WA_WEBCONSOLE261
 

function confirmDialog(r_varConfirmDialogProp)                                  // 800WA_WEBCONSOLE261 
{
 	window.showModalDialog('jsp/confirmDialog.html',r_varConfirmDialogProp,"dialogHeight:150px;dialogWidth:300px;status:no;help:no");   // 800WA_WEBCONSOLE261
	if(r_varConfirmDialogProp.l_varReturnValue == 0)                            // 800WA_WEBCONSOLE261
	{                                                                           // 800WA_WEBCONSOLE261
		return true;                                                            // 800WA_WEBCONSOLE261			  
	}                                                                           // 800WA_WEBCONSOLE261
	if(r_varConfirmDialogProp.l_varReturnValue == 2)                            // 800WA_WEBCONSOLE261
	{                                                                           // 800WA_WEBCONSOLE261
		return false;                                                           // 800WA_WEBCONSOLE261			  
	}                                                                           // 800WA_WEBCONSOLE261
}                                                                               // 800WA_WEBCONSOLE261
 
function confirmationDialog(r_varTitle,r_varIcon,r_varId,r_varMessage,r_varOk,r_varCancel,r_varAlt,r_varNumberOfButton) // 800WA_WEBCONSOLE261
{                                                                               // 800WA_WEBCONSOLE261
   this.l_varTitle = r_varTitle;                                                // 800WA_WEBCONSOLE261
   this.l_varIcon = r_varIcon;                                                  // 800WA_WEBCONSOLE261
   this.l_varId = r_varId;                                                      // 800WA_WEBCONSOLE261
   this.l_varMessage = r_varMessage;                                            // 800WA_WEBCONSOLE261
   this.l_varOk = r_varOk;                                                      // 800WA_WEBCONSOLE261
   this.l_varCancel = r_varCancel;                                              // 800WA_WEBCONSOLE261
   this.l_varAlt = r_varAlt;                                                    // 800WA_WEBCONSOLE261
   this.l_varReturnValue = 2;                                                   // 800WA_WEBCONSOLE261
   this.l_varNumberofButton = r_varNumberOfButton;                              // 800WA_WEBCONSOLE261                                                  
}                                                                               // 800WA_WEBCONSOLE261                                                                         

function removeSelection(obj)                                                   // 800WA_WEBCONSOLE368
{                                                                               // 800WA_WEBCONSOLE368
	var val = obj.value;                                                        // 800WA_WEBCONSOLE368
	obj.value = "";                                                             // 800WA_WEBCONSOLE368
	obj.value = val;                                                            // 800WA_WEBCONSOLE368
}                                                                               // 800WA_WEBCONSOLE368

var resizeFlag = 0;                                                             // 800WA_WEBCONSOLE404
function resetHeader(flag)                                                      // 800WA_WEBCONSOLE404
{                                                                               // 800WA_WEBCONSOLE404
	var product_logo = 0;                                                       // 800WA_WEBCONSOLE404
	if(isExist("product_logo"))                                                 // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
		product_logo = document.getElementById("product_logo").width;           // 800WA_WEBCONSOLE404
	}                                                                           // 800WA_WEBCONSOLE404
	var company_logo = 0;                                                       // 800WA_WEBCONSOLE404
	if(isExist("company_logo"))                                                 // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
		company_logo = document.getElementById("company_logo").width;            // 800WA_WEBCONSOLE404
	}                                                                           // 800WA_WEBCONSOLE404
	var size =   product_logo + company_logo ;                                  // 800WA_WEBCONSOLE404
	var menuTableWidth = 0;                                                     // 800WA_WEBCONSOLE404	
	if(isExist("menuTable"))                                                    // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
		menuTableWidth = document.getElementById("menuTable").clientWidth;      // 800WA_WEBCONSOLE404
	}                                                                           // 800WA_WEBCONSOLE404
	
	if(flag == 'AlertLogDelete')                                                // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
	 size =                                                                     // 800WA_WEBCONSOLE404
	 //(document.body.clientWidth < size) ? size+9 : document.body.clientWidth-20;// 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE428
	 (document.body.clientWidth < size) ? size+9 : document.body.clientWidth-24;// 800WA_WEBCONSOLE428
	}                                                                           // 800WA_WEBCONSOLE404
	else                                                                        // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
	size =                                                                      // 800WA_WEBCONSOLE404
	 (document.body.clientWidth < size) ? size+9 : document.body.clientWidth-40;// 800WA_WEBCONSOLE404
	}                                                                           // 800WA_WEBCONSOLE404
	if(document.body.clientWidth >= 688 && document.body.clientWidth <= 735)    // 800WA_WEBCONSOLE404
	size = product_logo + company_logo + 9;                                     // 800WA_WEBCONSOLE404
	

	if(menuTableWidth == 0)                                                     // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
	     menuTableWidth = size ;                                                // 800WA_WEBCONSOLE404
	}                                                                           // 800WA_WEBCONSOLE404
	if(size <= menuTableWidth)                                                  // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
	    if(isExist("logo"))                                                     // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
	        document.getElementById("logo").style.width = menuTableWidth;       // 800WA_WEBCONSOLE404
	    }                                                                       // 800WA_WEBCONSOLE404
	    if(isExist("close_button"))                                             // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
		    document.getElementById("close_button").style.width = 
		                    menuTableWidth-2;                                   // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
		if(isExist("menu-hr"))                                                  // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
		    document.getElementById("menu-hr").style.width = menuTableWidth;    // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
		if(isExist("menu"))                                                     // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
			if(flag == 'true')                                                  // 800WA_WEBCONSOLE404
			{                                                                   // 800WA_WEBCONSOLE404
			    document.getElementById("menu").style.width = size;             // 800WA_WEBCONSOLE404
			}                                                                   // 800WA_WEBCONSOLE404
			if(flag == 'NotificationAlert')                                     // 800WA_WEBCONSOLE404
			{                                                                   // 800WA_WEBCONSOLE404
			    document.getElementById("menu").style.width = menuTableWidth;   // 800WA_WEBCONSOLE404
			}                                                                   // 800WA_WEBCONSOLE404
			if(flag == 'AlertLogDelete')                                        // 800WA_WEBCONSOLE404
			{                                                                   // 800WA_WEBCONSOLE404
			    if (isExist("data")) {                                          // 800WA_WEBCONSOLE458
			       if (size < document.getElementById("data").clientWidth) {    // 800WA_WEBCONSOLE458
			           size = 0;                                                // 800WA_WEBCONSOLE458
			       }                                                            // 800WA_WEBCONSOLE458
			    }                                                               // 800WA_WEBCONSOLE458
			    document.getElementById("menuTable").style.width = size;		// 800WA_WEBCONSOLE458	
			    //document.getElementById("menuTable").style.width =            // 800WA_WEBCONSOLE458
			              //menuTableWidth;                                     // 800WA_WEBCONSOLE404 //800WA_WEBCONSOLE458
			    document.getElementById("menu").style.width = menuTableWidth;   // 800WA_WEBCONSOLE404
			}                                                                   // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
	}                                                                           // 800WA_WEBCONSOLE404
	else                                                                        // 800WA_WEBCONSOLE404
	{                                                                           // 800WA_WEBCONSOLE404
		if(isExist("logo"))                                                     // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
		    document.getElementById("logo").style.width = size;                 // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
		if(isExist("close_button"))                                             // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
			document.getElementById("close_button").style.width = size;         // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
		if(isExist("menu-hr"))                                                  // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
			document.getElementById("menu-hr").style.width = size;              // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
		if(isExist("menu"))                                                     // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
			document.getElementById("menu").style.width = size;                 // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
		if(flag == 'NotificationAlert')                                         // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
		    document.getElementById("menu").style.width = size;                 // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
		if(flag == 'AlertLogDelete')                                            // 800WA_WEBCONSOLE404
		{                                                                       // 800WA_WEBCONSOLE404
		    document.getElementById("menuTable").style.width = size;            // 800WA_WEBCONSOLE404
		    document.getElementById("menu").style.width = size;                 // 800WA_WEBCONSOLE404
		}                                                                       // 800WA_WEBCONSOLE404
	}                                                                           // 800WA_WEBCONSOLE404	
	
	//Attribute Settings function
	//if(isExist("setting")&& isExist("setButton") && isExist("scrollTable") && 
	//                             isExist("alertSearchTable"))                 // 800WA_WEBCONSOLE404  // 800WA_WEBCONSOLE488
	if(isExist("setting")&& isExist("setButton") && isExist("scrollTable") && 
	   isExist("alertSearchTable") && isExist("pagination"))                    // 800WA_WEBCONSOLE488
	{                                                                           // 800WA_WEBCONSOLE404
	
		document.getElementById("setting").style.width = 0;                     // 800WA_WEBCONSOLE462
		document.getElementById("setButton").style.width = 0;                   // 800WA_WEBCONSOLE462
		document.getElementById("scrollTable").style.width = 0;                 // 800WA_WEBCONSOLE462
		document.getElementById("pagination").style.width = 0;                  // 800WA_WEBCONSOLE462
		document.getElementById("alertSearchTable").style.width = 0;            // 800WA_WEBCONSOLE462
		
		var setting = document.getElementById("setting").clientWidth;           // 800WA_WEBCONSOLE404
		var setButton = document.getElementById("setButton").clientWidth;       // 800WA_WEBCONSOLE404
		var dataTable = document.getElementById("scrollTable").clientWidth;     // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE428
		var pagination = document.getElementById("pagination").clientWidth;     //800WA_WEBCONSOLE428
		var alertSearchTable = document.getElementById("alertSearchTable").clientWidth; // 800WA_WEBCONSOLE404
		//var = body = document.body.clientWidth;                               // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE428
		var body = parent.frames[0].document.body.clientWidth;                  // 800WA_WEBCONSOLE428
		var array = new Array();                                                // 800WA_WEBCONSOLE404
		array[0] = setting;                                                     // 800WA_WEBCONSOLE404
		array[1] = setButton;                                                   // 800WA_WEBCONSOLE404
		array[2] = dataTable;                                                   // 800WA_WEBCONSOLE404
		array[3] = alertSearchTable;                                            // 800WA_WEBCONSOLE404
		array[4] = pagination;                                                  // 800WA_WEBCONSOLE488
		
		//array[4] = body;                                                      // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE462
		//array[5] = parent.frames[0].document.getElementById("product_logo").width +
        //		   parent.frames[0].document.getElementById("company_logo").width;//800WA_WEBCONSOLE428 // 800WA_WEBCONSOLE462
		//array[4] = parent.frames[0].document.getElementById("product_logo")   // 800WA_WEBCONSOLE462 // 800WA_WEBCONSOLE488
		//           .width + parent.frames[0].document                         // 800WA_WEBCONSOLE462 // 800WA_WEBCONSOLE488
		//           .getElementById("company_logo").width;                     // 800WA_WEBCONSOLE462 // 800WA_WEBCONSOLE488
	
		//array.sort();                                                         // 800WA_WEBCONSOLE404  // 800WA_WEBCONSOLE462
		array.sort(comparison);                                                 // 800WA_WEBCONSOLE462
		array.reverse();                                                        // 800WA_WEBCONSOLE404		
		var maxSize = array[0];                                                 // 800WA_WEBCONSOLE404
		
		//if(maxSize == body)                                                   // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE462
		//{                                                                     // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE462
		// maxSize = maxSize - 36;                                              // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE462
		//}                                                                     // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE462
		//document.body.width = maxSize;                                        // 800WA_WEBCONSOLE428 // 800WA_WEBCONSOLE462
		//maxSize = (alertSearchTable > (body-18)) ? alertSearchTable : body-22;// 800WA_WEBCONSOLE428 // 800WA_WEBCONSOLE462
		
		document.getElementById("setting").style.width = maxSize;               // 800WA_WEBCONSOLE404
		document.getElementById("setButton").style.width = maxSize;             // 800WA_WEBCONSOLE404
		document.getElementById("scrollTable").style.width = maxSize;           // 800WA_WEBCONSOLE404 // 800WA_WEBCONSOLE428
		document.getElementById("pagination").style.width = maxSize;            // 800WA_WEBCONSOLE428
		document.getElementById("alertSearchTable").style.width = maxSize;      // 800WA_WEBCONSOLE404
				
	}                                                                           // 800WA_WEBCONSOLE404
	
	if(isExist("start-hr"))                                                     // 800WA_WEBCONSOLE428
	{                                                                           // 800WA_WEBCONSOLE428
        var StartLength = document.body.clientWidth;                            // 800WA_WEBCONSOLE428
        size = (size > (StartLength-18)) ? size : StartLength-22;               // 800WA_WEBCONSOLE428
	    document.getElementById("start-hr").style.width = size;                 // 800WA_WEBCONSOLE428
	    document.getElementById("start-Msg").style.width = size;                // 800WA_WEBCONSOLE428
	    document.getElementById("start-Btn").style.width = size;                // 800WA_WEBCONSOLE428
	    document.getElementById("start-CopyRight").style.width = size;          // 800WA_WEBCONSOLE428
	}                                                                           // 800WA_WEBCONSOLE428
}                                                                               // 800WA_WEBCONSOLE404

function isExist(r_varName)                                                     // 800WA_WEBCONSOLE404
{                                                                               // 800WA_WEBCONSOLE404
    return ( document.getElementById(r_varName) != null );                      // 800WA_WEBCONSOLE404
}                                                                               // 800WA_WEBCONSOLE404


/**                                                                             // 800WA_WEBCONSOLE445
 * This method is used to change the color of the selected link                 // 800WA_WEBCONSOLE445
 * @param r_objLink contains the object of the link                             // 800WA_WEBCONSOLE445
 * @since 08-00                                                                 // 800WA_WEBCONSOLE445
 */                                                                             // 800WA_WEBCONSOLE445
 function linkClicked(r_objLink) {                                              // 800WA_WEBCONSOLE445
	
	if (r_objLink != null) {                                                    // 800WA_WEBCONSOLE445
        changeAllLinkColor("white");                                            // 800WA_WEBCONSOLE445
        r_objLink.style.backgroundColor = "gray";                               // 800WA_WEBCONSOLE445
	}                                                                           // 800WA_WEBCONSOLE445
}                                                                               // 800WA_WEBCONSOLE445

/**                                                                             // 800WA_WEBCONSOLE445
 * This method is used to reset the color of all the links                      // 800WA_WEBCONSOLE445    
 * @since 08-00                                                                 // 800WA_WEBCONSOLE445
 */                                                                             // 800WA_WEBCONSOLE445
function releaseSelection() {                                                   // 800WA_WEBCONSOLE445
	if (event.srcElement.tagName.toUpperCase() != "A") {                        // 800WA_WEBCONSOLE445
		changeAllLinkColor("white");                                            // 800WA_WEBCONSOLE445
	}                                                                           // 800WA_WEBCONSOLE445
}                                                                               // 800WA_WEBCONSOLE445

/**                                                                             // 800WA_WEBCONSOLE445
 * This method is used to change the color of all the links                     // 800WA_WEBCONSOLE445
 * @param r_stColor contains the string representing the color                  // 800WA_WEBCONSOLE445
 * @since 08-00                                                                 // 800WA_WEBCONSOLE445
 */                                                                             // 800WA_WEBCONSOLE445
function changeAllLinkColor(r_stColor) {                                        // 800WA_WEBCONSOLE445

    var l_stColor = "white";                                                    // 800WA_WEBCONSOLE445
    if(r_stColor != null) {                                                     // 800WA_WEBCONSOLE445
    	l_stColor = r_stColor;                                                  // 800WA_WEBCONSOLE445
    }                                                                           // 800WA_WEBCONSOLE445

	var l_arrLinks = new Array();                                               // 800WA_WEBCONSOLE445
	
	if (parent.frames["list"] != null) {                                        // 800WA_WEBCONSOLE445
	    l_arrLinks = parent.frames["list"].document.links;                      // 800WA_WEBCONSOLE445
	}                                                                           // 800WA_WEBCONSOLE445
	else if (parent.frames["groupListFrame"] != null) {                         // 800WA_WEBCONSOLE445
	    l_arrLinks = parent.frames["groupListFrame"].document.links;            // 800WA_WEBCONSOLE445
	    if(parent.frames["groupListFrame"].document.forms[0] != null){          // 800WA_WEBCONSOLE493
        parent.frames["groupListFrame"].document.forms[0].climbTrail.value = '';// 800WA_WEBCONSOLE488
        }                                                                       // 800WA_WEBCONSOLE493
	}                                                                           // 800WA_WEBCONSOLE445
	else if (parent.frames["hostList"] != null) {                               // 800WA_WEBCONSOLE445
	    l_arrLinks = parent.frames["hostList"].document.links;                  // 800WA_WEBCONSOLE445
	}                                                                           // 800WA_WEBCONSOLE445
	
	for (var l_iIdx = 0; l_iIdx < l_arrLinks.length; l_iIdx++) {                // 800WA_WEBCONSOLE445
		l_arrLinks[l_iIdx].style.backgroundColor = l_stColor;                   // 800WA_WEBCONSOLE445
	}	                                                                        // 800WA_WEBCONSOLE445
}                                                                               // 800WA_WEBCONSOLE445

/**                                                                             // 800WA_WEBCONSOLE457
 * This method is used to display the page once the it is loaded completely     // 800WA_WEBCONSOLE457
 * @param r_fucObj contains the procedure object                                // 800WA_WEBCONSOLE457
 * @since 08-00                                                                 // 800WA_WEBCONSOLE457
 */                                                                             // 800WA_WEBCONSOLE457
function addOnloadEvent(r_fucObj) {                                             // 800WA_WEBCONSOLE457
    if ( typeof window.addEventListener != "undefined" ) {                      // 800WA_WEBCONSOLE457
        window.addEventListener( "load", r_fucObj, false );                     // 800WA_WEBCONSOLE457
        }                                                                       // 800WA_WEBCONSOLE457
    else if ( typeof window.attachEvent != "undefined" ) {                      // 800WA_WEBCONSOLE457
            window.attachEvent( "onload", r_fucObj );                           // 800WA_WEBCONSOLE457
        }                                                                       // 800WA_WEBCONSOLE457
    else {                                                                      // 800WA_WEBCONSOLE457
        if ( window.onload != null ) {                                          // 800WA_WEBCONSOLE457
            var oldOnload = window.onload;                                      // 800WA_WEBCONSOLE457
            window.onload = function ( e ) {                                    // 800WA_WEBCONSOLE457
                oldOnload( e );                                                 // 800WA_WEBCONSOLE457
                window[r_fucObj]();                                             // 800WA_WEBCONSOLE457
            };                                                                  // 800WA_WEBCONSOLE457
        }                                                                       // 800WA_WEBCONSOLE457
        else {                                                                  // 800WA_WEBCONSOLE457
            window.onload = r_fucObj;                                           // 800WA_WEBCONSOLE457
        }                                                                       // 800WA_WEBCONSOLE457
    }                                                                           // 800WA_WEBCONSOLE457
}                                                                               // 800WA_WEBCONSOLE457

/**                                                                             // 800WA_WEBCONSOLE462
 * This method is called by the sort javascript built-in function               // 800WA_WEBCONSOLE462
 * @param r_stX contains the first value                                        // 800WA_WEBCONSOLE462
 * @param r_stY contains the second value                                       // 800WA_WEBCONSOLE462
 * @since 08-00                                                                 // 800WA_WEBCONSOLE462
 */                                                                             // 800WA_WEBCONSOLE462
function comparison(r_stX, r_stY) {                                             // 800WA_WEBCONSOLE462                                             
    
    if (r_stX == null || r_stY == null) {                                       // 800WA_WEBCONSOLE462
        return;                                                                 // 800WA_WEBCONSOLE462
    }                                                                           // 800WA_WEBCONSOLE462
    
    l_iX = parseInt(r_stX,10);                                                  // 800WA_WEBCONSOLE462
    l_iY = parseInt(r_stY,10);                                                  // 800WA_WEBCONSOLE462
    if (l_iX > l_iY) {                                                          // 800WA_WEBCONSOLE462
        return 1;                                                               // 800WA_WEBCONSOLE462
    }                                                                           // 800WA_WEBCONSOLE462
    if (l_iX < l_iY) {                                                          // 800WA_WEBCONSOLE462
        return -1;                                                              // 800WA_WEBCONSOLE462
    }                                                                           // 800WA_WEBCONSOLE462
    return 0;                                                                   // 800WA_WEBCONSOLE462
}                                                                               // 800WA_WEBCONSOLE462

/**
 * This function is used to display the Default Header Screen Name if the 
 * Detailed block is blank in Agent service setting, Webconsole service setting 
 * and Manager service settings screen
 * @since 08-00
 */
 function clearHeader()                                                          //800WA_WEBCONSOLE487
 {                                                                               //800WA_WEBCONSOLE487  
      if(parent.webconSetupValue != null)                                        // 800WA_WEBCONSOLE487
      {                                                                          // 800WA_WEBCONSOLE487
         parent.webconSetupValue = false;                                        // 800WA_WEBCONSOLE487
      }                                                                          // 800WA_WEBCONSOLE487  
      if(parent.main!= null)                                                     //800WA_WEBCONSOLE487
      {                                                                          //800WA_WEBCONSOLE487
         if(parent.main.m_valueChangeFlag != null)                               // 800WA_WEBCONSOLE487
         {                                                                       // 800WA_WEBCONSOLE487
            parent.main.m_valueChangeFlag = false;                               // 800WA_WEBCONSOLE487
         }                                                                       // 800WA_WEBCONSOLE487
      }                                                                          // 800WA_WEBCONSOLE487   
      if(parent.cmdTimeOutSetupValue != null)                                    // 800WA_WEBCONSOLE487
      {                                                                          // 800WA_WEBCONSOLE487
         parent.cmdTimeOutSetupValue = false;                                    // 800WA_WEBCONSOLE487
      }                                                                          // 800WA_WEBCONSOLE487  
     if(parent.frames[0]!= null)                                                 //800WA_WEBCONSOLE487
     {                                                                           //800WA_WEBCONSOLE487
       if(parent.frames[0].document != null)                                     //800WA_WEBCONSOLE487
       {                                                                         //800WA_WEBCONSOLE487
          if(parent.frames[0].document.getElementById('page_title') != null)     //800WA_WEBCONSOLE487
          {                                                                      //800WA_WEBCONSOLE487  
             parent.frames[0].document.getElementById('page_title').innerHTML =  //800WA_WEBCONSOLE487 
                                parent.frames[0].m_headingArray["default"];      //800WA_WEBCONSOLE487 
          }                                                                      //800WA_WEBCONSOLE487 
       }                                                                         //800WA_WEBCONSOLE487 
     }                                                                           //800WA_WEBCONSOLE487 
 }                                                                               //800WA_WEBCONSOLE487 