var candidateLogout;

function init(){
    try{
        if (triggerAutoLogout == "True"){
            candidateLogout = setTimeout("Logoff()", 1000);
        }
    }
    catch(e){}
}

function trim(str)
{
    return str.replace(/^\s+|\s+$/g,"")
}


//This is where you set the Time limit. 1200 = 20 minutes (20 * 60s)
var maxTimeLimit = 1200;
function Logoff()
{
    try{
        if (maxTimeLimit <= 120){
            document.getElementById("divTimer").style.display="block";
        }
        
        if (maxTimeLimit <= 0){
            window.location = "Logout.aspx";
        }
        else{
            maxTimeLimit = maxTimeLimit - 1;
            setTimeout("Logoff()", 1000);   
            document.getElementById("lblTimer").innerHTML = maxTimeLimit;
        }
    }
    catch(e){}
}

function hidestatus()
{
    window.status='';
    return true;
}

function stopAutoLogout()
{
    clearTimeout(candidateLogout);
}

document.onmouseover=hidestatus
document.onmouseout=hidestatus

/* This part defines the sIFR stuff */
$().ready(function()
{
	if(typeof sIFR == "function")
	{
									
		bodyh1=named({
						sSelector:"body h1",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(bodyh1);
									
		homePageH2=named({
						sSelector:".homePage .hero h2",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(homePageH2);									
		
		// Add DSC
		homeH2=named({
						sSelector:".homePage #contentArea h2",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(homeH2);	
		// End. Add DSC
		
		// Add DGS
		searchH3=named({
						sSelector:".B01_jobSearch #jobSearch h3",													
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(searchH3);	
		// End. Add DGS
		
		// Add DGS
		quickSearchH3=named({
						sSelector:".B01_jobSearch h3",													
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(quickSearchH3);	
		// End. Add DGS
											
		landingSubHeading=named({
						sSelector:".textContainer h3",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#000000",
						sBgColor:"#FFFFFF",
						sHoverColor:"#CCCCCC",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(landingSubHeading);
		
		
		
		
		searchFormH3=named({
						sSelector:"#searchPage h3",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});	
		sIFR.replaceElement(searchFormH3);									
		
		roundedPanel=named({
						sSelector:".roundedPanel p",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#ffffff",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});										
		sIFR.replaceElement(roundedPanel);						
		
		faqH4=named({
						sSelector:".faqPage h4",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});	
		sIFR.replaceElement(faqH4);				
									
		miniPanelsH3=named({
						sSelector:".miniPanels h3",
						sFlashSrc:"asset/js/vagRounded.swf",
						sColor:"#756C63",
						sLinkColor:"#ffffff",
						sBgColor:"",
						sHoverColor:"#ff2222",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});	
		sIFR.replaceElement(miniPanelsH3);													
	};	
								
});
