var rightCaret = String.fromCharCode (62);

function btnCancelMessage(bid, pid){
	location.href="index.asp?pageid="+pid+"&babyID="+bid;
}

function findaDoc(pageID,docID){
location.href='index.asp?pageid='+pageID +'&practice='+docID;
}


function changeTab(tabID){
		switch (tabID){
			case 1:
				document.getElementById("tab1").className="active";
				document.getElementById("tab2").className="none";
				document.getElementById("tabBox1").style.display="block";
				document.getElementById("tabBox2").style.display="none";
				break;
			
			case 2:
				document.getElementById("tab1").className="none";
				document.getElementById("tab2").className="active";
				document.getElementById("tabBox2").style.display="block";
				document.getElementById("tabBox1").style.display="none";
				break;
		}

	}
	
function openWin( windowURL, windowName, windowFeatures )
{return window.open( windowURL, windowName, windowFeatures );}
 
function SubmitRec(frm){frm.submit();}

function displayChildren(sMenu){
   var d = document.getElementById(sMenu);
   if (d.className == "clsHiddenMenu")
      d.className = "clsVisibleMenu";
   else
      d.className = "clsHiddenMenu";
}
function LaunchImageManager(){
   window.showModalDialog("/admin/imageManager.asp", "select:no", "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:700px; dialogHeight:520px;");
}  
function LaunchResourceManager(){ 
   window.showModalDialog("/admin/resourceManager.asp", "select:no", "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:700px; dialogHeight:450px;");
}  
function pickImageFile(el){
   var sResult = window.showModalDialog("/admin/imageManager.asp", "value:" + el.value, "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:700px; dialogHeight:520px;");
   if (sResult != "cancel") el.value = sResult;
}   
function pickResourceFile(el, dir){
   var args = "value:" + el.value;
   if (dir)
      args += ";root:" + dir;
   var sResult = window.showModalDialog("/admin/resourceManager.asp", args, "resizable:no; help:no; status:no; scroll:no; font-size:14px; dialogWidth:700px; dialogHeight:520px;");
   if (sResult != "cancel") el.value = sResult;
}

function viewFile(el){
   if (el.value != "")
      window.open(el.value);
   else
      alert("Please select a file first.");
}
function clearSetting(el){
   el.value = "";
}		
function checkName(el)
{
	var allowKey = false;
	var keyCode = window.event.keyCode;
	switch (true)
	{
		case (el.value.length >= 50):
			allowKey = false;
			break;
		case (keyCode == 45):
		case ((keyCode >= 48) && (keyCode <= 57)): 
		case ((keyCode >= 65) && (keyCode <= 90)):
		case ((keyCode >= 97) && (keyCode <= 122)):
			allowKey = true;
			break;
		default:
			allowKey = false;
			break;
	}
	window.event.returnValue = allowKey;
}
function checkKey(){
   var e = window.event;
   if (e.keyCode == 13) 
      submitForm();
   e.cancelBubble = true;
}

