
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}

function setCookie(c_name,value,expiredays)
{var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function checkSurveyClick()
{
Surveyname=getCookie('Surveyname');
if (Surveyname!=null && Surveyname!="")
  {  
	document.write('survey taken');	
  }
  else 
  {  
	toggleBox('info',1);  
  }
}
// For survey section on the homepage

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

function bwwNewWindow(strMyPage, strMyName, intWidth, intheight, scroll) {
	var intWidth;   // width and height of the popup window, these values are in the anchor link
	var intheight;  //
	
	var intWinLeft = 200; // location of the popup window, this is set at the center of screen
	var intWinTop = 200;
	var strWinprops = 'height='+intheight+',width='+intWidth+',top='+intWinTop+',left='+intWinLeft+',scrollbars='+scroll+',resizable=no'; 
	var strwin = window.open(strMyPage, strMyName, strWinprops);
	if (parseInt(navigator.appVersion) >= 4) { strwin.window.focus(); }
	}
	
	
	
	

