﻿// JScript File
$(document).ready(function(){

    $(".hasEvent").parent().css("background", "url(_img/ahapc_cell.gif) repeat-y")
    $("#ctl00_SideBar_calDocumentDate_image").attr("src","_img/cal_icon.gif")
    $("#ctl00_SideBar_calDocumentDate_textBox").val(" Date")
    $("#ctl00_SideBar_calDocumentDate_textBox").focus(function(){
        if($(this).val() == "" || $(this).val() == " Date"){
        $(this).val("");
        }
    });
    $("#ctl00_SideBar_calDocumentDate_textBox").blur(function(){
        if($(this).val() == ""){
        $(this).val(" Date");
        }
    });
    
    /////////////////Admin//////////////////////

    $("#ctl00_MainContent_RadioButtonList1_0").click(function(){
        $("#ExternalLinkBox").hide()
        $("#FileUploadBox").show()
    })
    $("#ctl00_MainContent_RadioButtonList1_1").click(function(){
        $("#ExternalLinkBox").show()
        $("#FileUploadBox").hide()
    })
    $("#ctl00_MainContent_RadioButtonList1_2").click(function(){
        $("#ExternalLinkBox").hide()
        $("#FileUploadBox").hide()
    })  
    
    ////////////////////////////////////////////
    
});

  function TSTFunction(num){
 swapView(num)
 alert("ddd");
  }
   function swapView(target){
                  if(target == 1){
                    $("#ExternalLinkBox").hide()
                    $("#FileUploadBox").show()
                  }else if(target == 2){
                    $("#ExternalLinkBox").show()
                    $("#FileUploadBox").hide()
                  }else{
                    $("#ExternalLinkBox").hide()
                    $("#FileUploadBox").hide()
                  }
              }
function ShowContent(target){

    $("#hide" + target).hide();
    $("#show" + target).show();

}

function HideContent(target){
    $("#hide" + target).show();
    $("#show" + target).hide();
}

function ContentExpand(id){


    $("#"+id).parent().children(".PreContent").hide();
    $("#"+id).parent().children(".ShowContent").show();
    $("#"+id).parent().children(".expandable").children(".collapsedable").show();
    $("#"+id).parent().children(".expandable").children(".expandable").hide();
    
    

}

function ResetSearch() {
    $("#ctl00_SideBar_calDocumentDate_textBox").val(" Date")
    $("#ctl00_SideBar_ddCategory").val("")
    $("#ctl00_SideBar_txtKeywords").val(" Keyword")
    $("#ctl00_SideBar_txtTitle").val(" Title")
    $("#ctl00_SideBar_txtAuthor").val(" Author")
    $("#ctl00_SideBar_txtSerialNo").val(" Serial #")
    $("#ctl00_SideBar_ddDocType").val("")
}

/**********************************************************************
	MAIN NAVIGATION
 *********************************************************************/

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}