
//read cookie function
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}


function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+";path=/;domain=bis.gov.uk;";

	
}


//show pop up on initial load
function showsurveyAbbey(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Abbey","_blank");
   
	
    }
window.location = url
return false;
}

function showsurveybeprofessional(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=beprofessional","_blank");
   
	
    }
window.location = url
return false;
}

function showsurveyCitation(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Citation","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyComposite(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Composite","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyDAS(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=DAS","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyDrury(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Drury","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyEllis(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Ellis","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyELAS(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=ELAS","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyFPB(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=FPB","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyHR(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=HR","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyLloyds(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Lloyds","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveymhlemp(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=mhlemp","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveymhlhands(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=mhlhands","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyNat(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Nat","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyNorth(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=North","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyPeninsula(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Peninsula","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyESP(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=ESP","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyBennets(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Bennets","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyBoys(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Boys","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyHarvey(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Harvey","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyHenmans(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Henmans","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyTrethowans(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Trethowans","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyALS(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=ALS","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyEnvex(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=Envex","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyPHSC(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=PHSC","_blank");
   
	
    }
window.location = url
return false;
}
function showsurveyRSA(url) {
    if (readCookie('anderson-bis') == null)
    {	
    window.open("http://webarchive.nationalarchives.gov.uk/+/http://govbox.org.uk/anderson/survey/surveys.php?prov=RSA","_blank");
   
	
    }
window.location = url
return false;
}


