//General
//for example: instead of each module writing out script found in moduleMaxMin_OnClick have the functionality cached
//
/*some variables declare for reference---by vyom dixit on 3rd July 2010 -----*/
var doc_host=document.domain;
//alert(doc_host);
/*--------------------------------------------------------------------------*/

var DNN_COL_DELIMITER = String.fromCharCode(16);
var DNN_ROW_DELIMITER = String.fromCharCode(15);
var __dnn_m_bPageLoaded = false;

window.onload = __dnn_Page_OnLoad;

function __dnn_ClientAPIEnabled()
{
	return typeof(dnn) != 'undefined';
}


function __dnn_Page_OnLoad()
{
	if (__dnn_ClientAPIEnabled())
	{
		var sLoadHandlers = dnn.getVar('__dnn_pageload');
		if (sLoadHandlers != null)
			eval(sLoadHandlers);
		
		dnn.dom.attachEvent(window, 'onscroll', __dnn_bodyscroll);
	}
	__dnn_m_bPageLoaded = true;
}

function __dnn_KeyDown(iKeyCode, sFunc, e)
{
	if (e == null)
		e = window.event;

	if (e.keyCode == iKeyCode)
	{
		eval(unescape(sFunc));
		return false;
	}
}

function __dnn_bodyscroll() 
{
	var oF=document.forms[0];	
	if (__dnn_ClientAPIEnabled() && __dnn_m_bPageLoaded)
		oF.ScrollTop.value=document.documentElement.scrollTop ? document.documentElement.scrollTop : dnn.dom.getByTagName("body")[0].scrollTop;
}

function __dnn_setScrollTop(iTop)
{
	if (__dnn_ClientAPIEnabled())
	{
		if (iTop == null)
			iTop = document.forms[0].ScrollTop.value;
	
		var sID = dnn.getVar('ScrollToControl');
		if (sID != null && sID.length > 0)
		{
			var oCtl = dnn.dom.getById(sID);
			if (oCtl != null)
			{
				iTop = dnn.dom.positioning.elementTop(oCtl);
				dnn.setVar('ScrollToControl', '');
			}
		}
		window.scrollTo(0, iTop);
	}
}

//Focus logic
function __dnn_SetInitialFocus(sID)
{
	var oCtl = dnn.dom.getById(sID);	
	if (oCtl != null && __dnn_CanReceiveFocus(oCtl))
		oCtl.focus();
}	

function __dnn_CanReceiveFocus(e)
{
	//probably should call getComputedStyle for classes that cause item to be hidden
	if (e.style.display != 'none' && e.tabIndex > -1 && e.disabled == false && e.style.visible != 'hidden')
	{
		var eParent = e.parentElement;
		while (eParent != null && eParent.tagName != 'BODY')
		{
			if (eParent.style.display == 'none' || eParent.disabled || eParent.style.visible == 'hidden')
				return false;
			eParent = eParent.parentElement;
		}
		return true;
	}
	else
		return false;
}

//Max/Min Script
function __dnn_ContainerMaxMin_OnClick(oLnk, sContentID)
{
	var oContent = dnn.dom.getById(sContentID);
	if (oContent != null)
	{
		var oBtn = oLnk.childNodes[0];
		var sContainerID = dnn.getVar('containerid_' + sContentID); //oLnk.getAttribute('containerid');
		var sCookieID = dnn.getVar('cookieid_' + sContentID); //oLnk.getAttribute('cookieid');
		var sCurrentFile = oBtn.src.toLowerCase().substr(oBtn.src.lastIndexOf('/'));
		var sMaxFile;
		var sMaxIcon;
		var sMinIcon;

		if (dnn.getVar('min_icon_' + sContainerID))
			sMinIcon = dnn.getVar('min_icon_' + sContainerID);
		else
			sMinIcon = dnn.getVar('min_icon');

		if (dnn.getVar('max_icon_' + sContainerID))
			sMaxIcon = dnn.getVar('max_icon_' + sContainerID);
		else
			sMaxIcon = dnn.getVar('max_icon');

		sMaxFile = sMaxIcon.toLowerCase().substr(sMaxIcon.lastIndexOf('/'));

		var iNum = 5;

		var animf = dnn.getVar('animf_' + sContentID);
		if (animf != null)
			iNum = new Number(animf);
			
		if (sCurrentFile == sMaxFile)
		{
			oBtn.src = sMinIcon;				
			//oContent.style.display = '';
			dnn.dom.expandElement(oContent, iNum);
			oBtn.title = dnn.getVar('min_text');
			if (sCookieID != null)
			{
				if (dnn.getVar('__dnn_' + sContainerID + ':defminimized') == 'true')
					dnn.dom.setCookie(sCookieID, 'true', 365);
				else
					dnn.dom.deleteCookie(sCookieID);
			}
			else
				dnn.setVar('__dnn_' + sContainerID + '_Visible', 'true');
		}
		else
		{
			oBtn.src = sMaxIcon;				
			//oContent.style.display = 'none';
			dnn.dom.collapseElement(oContent, iNum);
			oBtn.title = dnn.getVar('max_text');
			if (sCookieID != null)
			{
				if (dnn.getVar('__dnn_' + sContainerID + ':defminimized') == 'true')
					dnn.dom.deleteCookie(sCookieID);
				else
					dnn.dom.setCookie(sCookieID, 'false', 365);				
			}
			else
				dnn.setVar('__dnn_' + sContainerID + '_Visible', 'false');			
		}
		
		return true;	//cancel postback
	}
	return false;	//failed so do postback
}

function __dnn_Help_OnClick(sHelpID)
{
	var oHelp = dnn.dom.getById(sHelpID);
	if (oHelp != null)
	{
		if (oHelp.style.display == 'none')
			oHelp.style.display = '';
		else
			oHelp.style.display = 'none';

		return true;	//cancel postback
	}
	return false;	//failed so do postback
}

function __dnn_SectionMaxMin(oBtn, sContentID)
{
	var oContent = dnn.dom.getById(sContentID);
	if (oContent != null)
	{
		var sMaxIcon = oBtn.getAttribute('max_icon');
		var sMinIcon = oBtn.getAttribute('min_icon');
		var bCallback = oBtn.getAttribute('userctr') != null;
		var sVal;
		if (oContent.style.display == 'none')
		{
			oBtn.src = sMinIcon;				
			oContent.style.display = '';
			if (bCallback)
			    sVal = 'True';
			else
			    dnn.setVar(oBtn.id + ':exp', 1);
		}
		else
		{
			oBtn.src = sMaxIcon;				
			oContent.style.display = 'none';
			if (bCallback)
			    sVal = 'False';
			else
                dnn.setVar(oBtn.id + ':exp', 0);
		}
		if (bCallback)
		    dnncore.setUserProp(oBtn.getAttribute('userctr'), oBtn.getAttribute('userkey'), sVal, null);
		return true;	//cancel postback
	}
	return false;	//failed so do postback
}

//Drag N Drop
function __dnn_enableDragDrop()
{
	var aryConts = dnn.getVar('__dnn_dragDrop').split(";");	
	var aryTitles;

	for (var i=0; i < aryConts.length; i++)
	{
		aryTitles = aryConts[i].split(" ");
		if (aryTitles[0].length > 0)
		{			
			var oCtr = dnn.dom.getById(aryTitles[0]);
			var oTitle = dnn.dom.getById(aryTitles[1]);
			if (oCtr != null && oTitle != null)
			{
				oCtr.setAttribute('moduleid', aryTitles[2]);
				dnn.dom.positioning.enableDragAndDrop(oCtr, oTitle, '__dnn_dragComplete()', '__dnn_dragOver()');
			}	
		}
	}
}

var __dnn_oPrevSelPane;
var __dnn_oPrevSelModule;
var __dnn_dragEventCount=0;
function __dnn_dragOver()
{
	__dnn_dragEventCount++;
	if (__dnn_dragEventCount % 75 != 0)	//only calculate position every 75 events
		return;
	
	var oCont = dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);

	var oPane = __dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);
		
	if (__dnn_oPrevSelPane != null)	//reset previous pane's border
		__dnn_oPrevSelPane.pane.style.border = __dnn_oPrevSelPane.origBorder;

	if (oPane != null)
	{		
		__dnn_oPrevSelPane = oPane;
		oPane.pane.style.border = '4px double ' + DNN_HIGHLIGHT_COLOR;
		var iIndex = __dnn_getPaneControlIndex(oCont, oPane);

		var oPrevCtl;
		var oNextCtl;
		for (var i=0; i<oPane.controls.length; i++)
		{
			if (iIndex > i && oPane.controls[i].id != oCont.id)
				oPrevCtl = oPane.controls[i];
			if (iIndex <= i && oPane.controls[i].id != oCont.id)
			{
				oNextCtl = oPane.controls[i];
				break;
			}
		}			
		
		if (__dnn_oPrevSelModule != null)
			dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border = __dnn_oPrevSelModule.origBorder;
			

		if (oNextCtl != null)
		{
			__dnn_oPrevSelModule = oNextCtl;
			dnn.dom.getNonTextNode(oNextCtl.control).style.borderTop = '5px groove ' + DNN_HIGHLIGHT_COLOR;
		}
		else if (oPrevCtl != null)
		{
			__dnn_oPrevSelModule = oPrevCtl;
			dnn.dom.getNonTextNode(oPrevCtl.control).style.borderBottom = '5px groove ' + DNN_HIGHLIGHT_COLOR;
		}
	}
}

function __dnn_dragComplete()
{
	var oCtl = dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);
	var sModuleID = oCtl.getAttribute('moduleid');
	
	if (__dnn_oPrevSelPane != null)
		__dnn_oPrevSelPane.pane.style.border = __dnn_oPrevSelPane.origBorder;

	if (__dnn_oPrevSelModule != null)
		dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border = __dnn_oPrevSelModule.origBorder;
		
	var oPane = __dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);
	var iIndex;
	if (oPane == null)
	{
		var oPanes = __dnn_Panes();
		for (var i=0; i<oPanes.length; i++)
		{
			if (oPanes[i].id == oCtl.parentNode.id)
				oPane = oPanes[i];
		}
	}	
	if (oPane != null)
	{
		iIndex = __dnn_getPaneControlIndex(oCtl, oPane);
		__dnn_MoveToPane(oPane, oCtl, iIndex);

		dnn.callPostBack('MoveToPane', 'moduleid=' + sModuleID, 'pane=' + oPane.paneName, 'order=' + iIndex * 2); 
	}
}

function __dnn_MoveToPane(oPane, oCtl, iIndex)
{

	if (oPane != null)
	{
		var aryCtls = new Array();
		for (var i=iIndex; i<oPane.controls.length; i++)
		{
			if (oPane.controls[i].control.id != oCtl.id)
				aryCtls[aryCtls.length] = oPane.controls[i].control;

			dnn.dom.removeChild(oPane.controls[i].control);
		}
		dnn.dom.appendChild(oPane.pane, oCtl);
		oCtl.style.top=0;
		oCtl.style.left=0;
		oCtl.style.position = 'relative';
		for (var i=0; i<aryCtls.length; i++)
		{
			dnn.dom.appendChild(oPane.pane, aryCtls[i]);
		}
		__dnn_RefreshPanes();
	}
	else
	{
		oCtl.style.top=0;
		oCtl.style.left=0;
		oCtl.style.position = 'relative';
	}
}

function __dnn_RefreshPanes()
{
	var aryPanes = dnn.getVar('__dnn_Panes').split(';');
	var aryPaneNames = dnn.getVar('__dnn_PaneNames').split(';');
	__dnn_m_aryPanes = new Array();
	for (var i=0; i<aryPanes.length; i++)
	{
		if (aryPanes[i].length > 0)
			__dnn_m_aryPanes[__dnn_m_aryPanes.length] = new __dnn_Pane(dnn.dom.getById(aryPanes[i]), aryPaneNames[i]);
	}
}

var __dnn_m_aryPanes;
var __dnn_m_aryModules;
function __dnn_Panes()
{
	if (__dnn_m_aryPanes == null)
	{
		__dnn_m_aryPanes = new Array();
		__dnn_RefreshPanes();
	}
	return __dnn_m_aryPanes;
}

function __dnn_Modules(sModuleID)
{
	if (__dnn_m_aryModules == null)
		__dnn_RefreshPanes();
	
	return __dnn_m_aryModules[sModuleID];
}

function __dnn_getMostSelectedPane(oContent)
{
	var oCDims = new dnn.dom.positioning.dims(oContent);
	var iTopScore=0;
	var iScore;
	var oTopPane;
	for (var i=0; i<__dnn_Panes().length; i++)
	{
		var oPane = __dnn_Panes()[i];
		var oPDims = new dnn.dom.positioning.dims(oPane.pane);
		iScore = dnn.dom.positioning.elementOverlapScore(oPDims, oCDims);
		
		if (iScore > iTopScore)
		{
			iTopScore = iScore;
			oTopPane = oPane;
		}
	}
	return oTopPane;
}

function __dnn_getPaneControlIndex(oContent, oPane)
{
	if (oPane == null)
		return;
	var oCDims = new dnn.dom.positioning.dims(oContent);
	var oCtl;
	if (oPane.controls.length == 0)
		return 0;
	for (var i=0; i<oPane.controls.length; i++)
	{
		oCtl = oPane.controls[i];
		var oIDims = new dnn.dom.positioning.dims(oCtl.control);
		if (oCDims.t < oIDims.t)
			return oCtl.index;
	}
	if (oCtl != null)
		return oCtl.index+1;
	else
		return 0;
}

//Objects
function __dnn_Pane(ctl, sPaneName)
{
	this.pane = ctl;
	this.id = ctl.id;
	this.controls = new Array();
	this.origBorder = ctl.style.border;
	this.paneName = sPaneName;
	
	var iIndex = 0;
	var strModuleOrder='';
	for (var i=0; i<ctl.childNodes.length; i++)
	{
		var oNode = ctl.childNodes[i];
		if (dnn.dom.isNonTextNode(oNode))	
		{
			if (__dnn_m_aryModules == null)
				__dnn_m_aryModules = new Array();

			//if (oNode.tagName == 'A' && oNode.childNodes.length > 0)
			//	oNode = oNode.childNodes[0];	//DNN now embeds anchor tag 
				
			var sModuleID = oNode.getAttribute('moduleid');
			if (sModuleID != null && sModuleID.length > 0)
			{
				strModuleOrder += sModuleID + '~';
				this.controls[this.controls.length] = new __dnn_PaneControl(oNode, iIndex);
				__dnn_m_aryModules[sModuleID] = oNode.id;
				iIndex+=1;
			}
		}
	}
	this.moduleOrder = strModuleOrder;

}

function __dnn_PaneControl(ctl, iIndex)
{
	this.control = ctl;
	this.id = ctl.id;
	this.index = iIndex;
	this.origBorder = ctl.style.border;
	
}

//move towards dnncore ns.  right now only for personalization
function __dnncore()
{
    this.GetUserVal = 0;
    this.SetUserVal = 1;
}

__dnncore.prototype = {
getUserProp: function(sNameCtr, sKey, pFunc) {
    this._doUserCallBack(dnncore.GetUserVal, sNameCtr, sKey, null, new dnncore.UserPropArgs(sNameCtr, sKey, pFunc));
},

setUserProp: function(sNameCtr, sKey, sVal, pFunc) {
    this._doUserCallBack(dnncore.SetUserVal, sNameCtr, sKey, sVal, new dnncore.UserPropArgs(sNameCtr, sKey, pFunc));
},

_doUserCallBack: function(iType, sNameCtr, sKey, sVal, pFunc) {
    if (dnn && dnn.xmlhttp)
    {
        var sPack = iType + COL_DELIMITER + sNameCtr + COL_DELIMITER + sKey + COL_DELIMITER + sVal;
        dnn.xmlhttp.doCallBack('__Page',sPack,dnncore._callBackSuccess,pFunc,dnncore._callBackFail,null,true,null,0);
    }
    else
        alert('Client Personalization not enabled');
},

_callBackSuccess: function (result, ctx, req) {
    if (ctx.pFunc)
        ctx.pFunc(ctx.namingCtr, ctx.key, result);
},

_callBackFail: function (result, ctx) {
	window.status = result;
}
}

__dnncore.prototype.UserPropArgs = function(sNameCtr, sKey, pFunc)
{
    this.namingCtr = sNameCtr;
	this.key = sKey;
	this.pFunc = pFunc;
}

var dnncore = new __dnncore();





// JScript File
function moveWindow(sectionName)
	{
	    //alert(sectionName);
	    window.location.hash=sectionName;
	    //alert('current location is:-'+window.location.hash);
	   // document.getElementById("spanHELP").style.cursor="hand";
	}
	
//js code to show pop-up window to show citywala server help on iBranch portal.

	//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;

//loading popup with jQuery magic!
function loadPopup(url){
    //alert("came in loadPopup");
	//loads popup only if it is disabled
	if(popupStatus==0){
	    //alert(url);
	    //url='http://192.168.1.200/ibranch/help/ibhelp.htm';
	     document.getElementById("ifHelp").src = url;
	    //document.getElementById("ifHelp").style.width=800;
	    //document.getElementById("ifHelp").style.height=600;
		$("#backgroundPopup").css({"opacity": "0.7"});
		//$("#backgroundPopup").slideDown("slow");
		$("#backgroundPopup").show();
		$("#popupContact").fadeIn(700);
		popupStatus = 1;
		//document.getElementById("ss_210299").style.zIndex=-1;
		//alert('aaya in loadpopup');
	}
}

//disabling popup with jQuery magic!
function disablePopup(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut(600);
		$("#popupContact").fadeOut(200);
		popupStatus = 0;
	}
}

//centering popup
function centerPopup(){
	//request data for centering
	var windowWidth = document.body.clientWidth;
	var windowHeight = document.body.clientHeight;
	var popupHeight = $("#popupContact").height();
	var popupWidth = $("#popupContact").width();
	//centering
	$("#popupContact").css({
		"position": "absolute",
		"top":0,
		"left":50,
		"height": 610,
		//"width":800,
		"z-index":2000
	});
	//only need force for IE6
	
	$("#backgroundPopup").css(
	{
	/*"height": 2 * windowHeight,
	"top": 265,
	*/
	    "height":windowHeight,
	    //"width":windowWidth,
	    "position":"absolute",
	    "top":0,
	    "left":0,
	    "z-index":1000
	}
	);
	
	//alert('aaya in loadpopup');
}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
	
	//LOADING POPUP
	//Click the button event!
	$(".button").click(function(){
		//centering with css
		centerPopup();
		//load popup
		loadPopup();
	});
				
	//CLOSING POPUP
	//Click the x event!
	$("#popupContactClose").click(function(){
		disablePopup();
	});
	//Click out event!
	//***$("#backgroundPopup").click(function(){disablePopup();});
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			disablePopup();
		}
	});

});



// JScript code for advertize content
function getDocumentUrl()
{
    //alert("iBranch 2.0");
    //var doc_url=document.title;
    var urlStr1='http://www.ibranch.in/ibapp/ads/getUrl.aspx?clientURL=abc';
    //urlStr1='http://static.ibranch.in/getUrl.aspx?clientURL=www.google.co.in';
    //document.getElementById('divAds').innerHTML='<img src="http://static.ibranch.in/ibapp/ads/ads_images/upgrade_ad.gif" />';
    try
    {
        $.get(urlStr1,function(data){
                                    if(data!='')
                                    {
	                                 //alert(data);
	                                 document.getElementById('divAds').style.dispaly='block';
	                                 document.getElementById('divAds').innerHTML=data;
                                    }
                                    else
                                    {
                                        //alert("No ads found.");
                                    }
                                }
          );
    }
    catch(e)
    {
        alert(e);   
    }
    finally
    {
    
    
    }
    
}
//getDocumentUrl();

// code for Respositroy module history tracking.
function getRepositoryHistory(ctrlid)
    {
          var _moduleId=document.getElementById(ctrlid).value;
          //alert(_moduleId)
          var dt=new Date();
          var newTime=dt.getTime();
          var urlStr='';
          if(doc_host='localhost')
          {
            urlStr= 'http://'+ doc_host+ "/" + "inteeg" +'/DesktopModules/Repository/GetRepostoryHistory.aspx?moduleId=';
          }
          else
          {
            urlStr='http://'+ doc_host + '/DesktopModules/Repository/GetRepostoryHistory.aspx?moduleId=';
          }
          $.get(urlStr + _moduleId + '&t='+newTime,function(data){
          //$.get('http://'+ doc_host +'/ibapp/ads/TestRespositoryHistroy.aspx?moduleId='+ _moduleId ,function(data){
            if(data!='')
            {
               // alert(data);
                document.getElementById("divRepoHistory").innerHTML=data;
            }
            else
            {
                alert('no data found');
            }
          });
    }

///-----------------new function to show portalinfo tabs on home page
    //-----------------added on date 13-11-2010 by vyom dixit
    
    function getChangeTabDisplay(ManagersDivID,TPODivID,HODDivID,FacultiesDivID,targetDivID,GuestDivID,dsgn)
    {
        //alert(ManagersDivID+TPODivID+HODDivID+FacultiesDivID+StudentsDivID+AlumniDivID+targetDivID+dsgn);
        //---for hidden section
        var objMGRS=document.getElementsByName(ManagersDivID);
        var iCountMG=0;
        for (iCountMG=0;iCountMG<objMGRS.length;iCountMG++)
        {
            objMGRS[iCountMG].className="xslPInfoTRHide";
        } 
        
        var objTP=document.getElementsByName(TPODivID);
        var iCountTP=0;
        for (iCountTP=0;iCountTP<objTP.length;iCountTP++)
        {
            objTP[iCountTP].className="xslPInfoTRHide";
        } 
               
        var objHODs=document.getElementsByName(HODDivID);
        var iCountHOD=0;
        for (iCountHOD=0;iCountHOD<objHODs.length;iCountHOD++)
        {
            objHODs[iCountHOD].className="xslPInfoTRHide";
        }
        var objFaculties=document.getElementsByName(FacultiesDivID);
        var iCountFS=0;
        for (iCountFS=0;iCountFS<objFaculties.length;iCountFS++)
        {
            objFaculties[iCountFS].className="xslPInfoTRHide";
        }
        
        var objGuest=document.getElementsByName(GuestDivID);
        var iCountGE=0;
        for (iCountGE=0;iCountGE<objGuest.length;iCountGE++)
        {
            objGuest[iCountGE].className="xslPInfoTRHide";
        }
        
       //----for display section
        var objtargets=document.getElementsByName(targetDivID);
        var iCountT=0;
        for (iCountT=0;iCountT<objtargets.length;iCountT++)
        {
            objtargets[iCountT].className="xslPInfoTRShow";
        }
        document.getElementById("divDesignation").innerHTML=dsgn;
        if(dsgn=="Management")
        {
            document.getElementById("tabManage").className="xslPInfoTABSelected";
            document.getElementById("tabHOD").className="xslPInfoTAB";
            document.getElementById("tabTPO").className="xslPInfoTAB";
            document.getElementById("tabFaculty").className="xslPInfoTAB";
            document.getElementById("tabGuest").className="xslPInfoTAB";
        }
        else if(dsgn=="HOD")
        {
            document.getElementById("tabManage").className="xslPInfoTAB";
            document.getElementById("tabHOD").className="xslPInfoTABSelected";
            document.getElementById("tabTPO").className="xslPInfoTAB";
            document.getElementById("tabFaculty").className="xslPInfoTAB";
            document.getElementById("tabGuest").className="xslPInfoTAB";
        }
        else if(dsgn=="TPO")
        {
            document.getElementById("tabManage").className="xslPInfoTAB";
            document.getElementById("tabHOD").className="xslPInfoTAB";
            document.getElementById("tabTPO").className="xslPInfoTABSelected";
            document.getElementById("tabFaculty").className="xslPInfoTAB";
            document.getElementById("tabGuest").className="xslPInfoTAB";
        }
        else if(dsgn=="Faculty") 
        {
            document.getElementById("tabManage").className="xslPInfoTAB";
            document.getElementById("tabHOD").className="xslPInfoTAB";
            document.getElementById("tabTPO").className="xslPInfoTAB";
            document.getElementById("tabFaculty").className="xslPInfoTABSelected";
            document.getElementById("tabGuest").className="xslPInfoTAB";
        }
        else if(dsgn=="Guest Expert")
        {
            document.getElementById("tabManage").className="xslPInfoTAB";
            document.getElementById("tabHOD").className="xslPInfoTAB";
            document.getElementById("tabTPO").className="xslPInfoTAB";
            document.getElementById("tabFaculty").className="xslPInfoTAB";
            document.getElementById("tabGuest").className="xslPInfoTABSelected";
        }
        else
        {
            document.getElementById("tabManage").className="xslPInfoTABSelected";
            document.getElementById("tabHOD").className="xslPInfoTAB";
            document.getElementById("tabTPO").className="xslPInfoTAB";
            document.getElementById("tabFaculty").className="xslPInfoTAB";
            document.getElementById("tabGuest").className="xslPInfoTAB";
        }
    }
