// JavaScript Document
function testDOM(){
	//alert ("1234");
	var varNav = document.getElementById("a");
	//alert (typeof varNav);
	var varListObject = varNav.getElementsByTagName("ul")[0];
	var varListItem =	varListObject.getElementsByTagName("li");
//
	alert (varListObject.length);
//	alert (varListObject[0].name);
	for( var i=0; i<varListObject.length; i++){
	alert (varListObject[i].style);
	}
	/*
bodyObject = document.getElementsByTagName;
//return;
write document.all[0];
alert (bodyObject[0]);
*/
}
function navHide(){
	if(!document.getElementById("")) return true;
};
function navShow(){
	
}

//Custom methods
//
//
//
//==================================================================
//Left(string, count): Returns a specified number of characters from the
//                     left side of a string
//				IN: str - the string 
//              count - the count position
//
//			RETVAL: count characters from the left side of the string
//
//------------------------------------------------------------------
function Left(str, count){
	var strLen = String(str).length;
	if((typeof str != "number") && (typeof str != "string")){
		alert("Left", "The input string '"+ str +"' is invalid.");
	};
	if (count <= 0){
		return "";
	} else if (count > strLen){
		return str;
	} else {
		return String(str).substring(0,count)+"";
	}
}// end function Left(str, count)
//
//
//
//==================================================================
//Right(string, count): Returns a specified number of characters from the
//                      right side of a string
//				IN: str - the string 
//              count - the count position
//
//      RETVAL: count characters from the right side of the string
//
//------------------------------------------------------------------
function Right(str, count){
	var strLen = String(str).length;
	if((typeof str != "number") && (typeof str != "string")){
		alert("Right", "The input string '"+ str +"' is invalid.");
	};
	if (count <= 0){
		return "";
	} else if (count > strLen){
		return str;
	} else {
		return String(str).substring(strLen, strLen - count)+"";
	}
}// end function Right(str, count)    
//
//
//
//==================================================================
//Mid(string, start, length): Returns a specified number of characters from a
//                            string
//				  IN: str - the string 
//                start - starting position -- not the index of the string
//                length - the length
//
//        RETVAL: the mid string
//
//------------------------------------------------------------------
function Mid(str, start, len){
	if((typeof str != "number") && (typeof str != "string")){
		alert("Mid", "The input string '"+ str +"' is invalid.");
	};
	// Make sure start and len are within proper bounds
	if (start <= 0 || len < 0){
		return "";
	};
	var iEnd, iLen = String(str).length;
	if (start + len > iLen){
		iEnd = iLen;
	} else {
		iEnd = (start - 1) + len;
	}
	return String(str).substring(start-1,iEnd)+"";

}// end function Mid(str, start, len)
//
//
//