// JavaScript Document
//---for adjusting height of page according to resolution---//

//---Function Start Here For Open Popup---//
	function openwin3(urlName)
		{	
			var win = window.open(urlName,'','location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no, width=465, height=410,top=150');
		}
	function openwin4(urlName)
		{	
			var win = window.open(urlName,'','location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no, width=330, height=510,top=150');
		}
//---Function End Here For Open Popup---//

//---Function Start Here For Open Flash---//
function openwin2(urlName)
{
	w = 709;
 	h = 572;
	wleft = (screen.width - w) / 2;
  	wtop = (screen.height - h) / 2;
 	var win = window.open(urlName,'',
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=no, resizable=no');
	// Just in case width and height are ignored
  	win.resizeTo(w, h);
  	// Just in case left and top are ignored
 	win.moveTo(wleft, wtop);
  	win.focus();	
}
//---Function End Here For Open Flash---//


//---Change Link Function Start Here---//
	function ChangeLink(newURL)
		{
			document.location.href = newURL;
		}
//---Change Link Function Start Here---//

/*--DropDown Menu Start Here--*/

//This function is for triming the string. Means these three function removes leading and trailing spaces of any string. 
function LTrim(str){if(str==null){return null;}for(var i=0;str.charAt(i)==" ";i++);return str.substring(i,str.length);}
function RTrim(str){if(str==null){return null;}for(var i=str.length-1;str.charAt(i)==" ";i--);return str.substring(0,i+1);}
function Trim(str){return LTrim(RTrim(str));}
//End of the Trim function.

var mnuName="";
function showMenuTest(eventObj, Objdv, objElement) {
	//alert('Show Menu')
	//This Blok is setting left position for div//
	 	var XReturnValue = 0;
		while( objElement != null ) 
		{
			XReturnValue += objElement.offsetLeft;
			objElement = objElement.offsetParent;
		}		
		
		if(mnuName!=Objdv)
		{
			var browser=navigator.appName;
			if (browser=="Netscape"||browser=="Safari")
			{
				document.getElementById(Objdv).style.left = XReturnValue + "px";
				//document.getElementById('HelpSMenu').style.left = XReturnValue -19 +"px";
			}
			else
			{
				document.getElementById(Objdv).style.left = XReturnValue + "px";
				//document.getElementById('HelpSMenu').style.left = XReturnValue -14 +"px";
			}
			mnuName=Objdv;
		}
		
	//Blok End Here//
	eventObj.cancelBubble = true;
    if(changeObjectVisibility(Objdv, 'visible')) {
	return true;
    } else {
	return false;
    }
}
function hideMenuTest(eventObj, Objdv,objElement) 
{
	//alert('Hide Menu')
	//This Blok is setting left position for div//
	eventObj.cancelBubble = true;
    if(changeObjectVisibility(Objdv, 'hidden')) {
	return true;
    } else {
	return false;
    }
}

function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
	
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getStyleObject

function changeObjectVisibility(objectId, newVisibility) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	//we couldn't find the object, so we can't change its visibility
	return false;
    }
} 

/*--DropDown Menu End Here--*/