SetCookie('test','yes',exp,'/fr/');  
 
var plugin =  "x"
plugin = GetCookie('plugin');
if (plugin+"1" != "v31") {plugin='x'}
var email = GetCookie('email');
var loginemail = GetCookie('loginemail');
var loginmem = GetCookie('loginmem');
var loginpassword = GetCookie('loginpassword');

var firstname = GetCookie('firstname');
var lastname = GetCookie('lastname');
var Firstname = GetCookie('Firstname');
var Lastname = GetCookie('Lastname');
var lang = GetCookie('lang');
var State = GetCookie('State');
var saved = GetCookie('saved');
var ZipCode = GetCookie('ZipCode');
var Country= GetCookie('Country');
var BirthMonth= GetCookie('BirthMonth');
var BirthYear= GetCookie('BirthYear');
var Sex = GetCookie('Sex');
//var Source = GetCookie('Source');
//var Child1 = GetCookie('Child1');
//var Child2 = GetCookie('Child2');
//var Child3 = GetCookie('Child3');
//var Child4 = GetCookie('Child4');
//var Child5 = GetCookie('Child5');
//var Child6 = GetCookie('Child6');
//var Child7 = GetCookie('Child7');
//var Income = GetCookie('Income');
//var Education = GetCookie('Education');
//var Job= GetCookie('Job');
//var Industry = GetCookie('Industry');
//var Role = GetCookie('Role');
//var document.survey.Child1.value = Child1;
//document.write("test ");
var show = GetCookie('show');
var membercode= GetCookie('membercode');
var update = GetCookie('update');
var source = GetCookie('source');


function cookietest(lang){
// TESTS IF COOKIES ARE ACTIVE, shows ALERT in LANG if INACTIVE.
//var cookietest = 1
var test = "no"
text4000 = "Please activate your cookies before continuing."
if (lang == "fr"){text4000 = "S.V.P. activez vos cookies avant de continuer. "}


var expSec = 10;
var exp = new Date();
exp.setTime(exp.getTime() + (expSec*1000));

//TEST FOR FIRST PARTY COOKIE
SetCookie('test','yes',exp,'/');
test = GetCookie('test');

if ( test != "yes" ){
if (confirm(text4000)) {
help = window.open('/' + lang +'/cookiehelp.asp','help','screenX=500, screenY=800, width=500, height=800, menubar=yes,toolbar=yes,location=yes,directories=yes,titlebar=yes,status=yes,scrollbars=yes,resizable=yes');

} else { //alert("Your cookies are set correctly. -  Vos cookies fonctionnent correctement.");
}
}	

//RESET COOKIE TO NO FOR NEXT TEST
SetCookie('test','no',exp,'/');

//TEST FOR SESSION VARIABLE COOKIE

return cookietest;

}







<!-- Original:  Ronnie T. Moore -->
<!-- Web Site:  The JavaScript Source -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin-->
var expDays = 365;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function getCookieVal (offset) {  
var endstr = document.cookie.indexOf (";", offset);  
if (endstr == -1)    
endstr = document.cookie.length;  
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}

function SetCookie (name, value,expires,path) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
//document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}





function updatecookies(v1){
cleancookies();
SetCookie("plugin", "x", exp,"/"); 
}


function cleancookies(plugin){
var cleanedplugin = 0
GetCookie('cleanedplugin');
if (cleanedplugin != 1) {
//if (plugin != "v3") {domainwrite = window.open('http://www.clicktel.com/blank.asp' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=0,top=0 , scrollbars=0' );};
domainwrite = window.open('http://www.clicktel.com/blank.asp' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite2 = window.open('http://www.clicktel.com/en/blank.asp' ,'domainwrite2','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2000,top=2100 , scrollbars=0' );
domainwrite4 = window.open('http://www.clicktel.com/fr/blank.asp' ,'domainwrite4','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite5 = window.open('http://clicktel.com/blank.asp' ,'domainwrite5','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite6 = window.open('http://clicktel.com/fr/blank.asp' ,'domainwrite6','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite7 = window.open('http://clicktel.com/en/blank.asp' ,'domainwrite7','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
SetCookie("cleanedplugin", "1", exp,"/");
}; 
}

function cleanlangcookies(lang){
var cleanedlang = 0
GetCookie('cleanedlang');
if (cleanedlang != 1) {
//domainwrite = window.open('http://www.clicktel.com/blankl.asp' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite2 = window.open('http://www.clicktel.com/en/blankl.asp' ,'domainwrite2','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2000,top=2100 , scrollbars=0' );
domainwrite4 = window.open('http://www.clicktel.com/fr/blankl.asp' ,'domainwrite4','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite5 = window.open('http://clicktel.com/blankl.asp' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite6 = window.open('http://clicktel.com/en/blankl.asp' ,'domainwrite2','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2000,top=2100 , scrollbars=0' );
domainwrite7 = window.open('http://clicktel.com/fr/blankl.asp' ,'domainwrite4','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
SetCookie("cleanedlang", "1", exp,"/"); 
};
}

function cleansourcecookies(source){
var cleanedsource = 0
GetCookie('cleanedsource');
if (cleanedsource != 1) {
//domainwrite = window.open('http://www.clicktel.com/blanks.asp' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite2 = window.open('http://www.clicktel.com/en/blanks.asp' ,'domainwrite2','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2000,top=2100 , scrollbars=0' );
domainwrite4 = window.open('http://www.clicktel.com/fr/blanks.asp' ,'domainwrite4','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite5 = window.open('http://clicktel.com/blanks.asp' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
domainwrite6 = window.open('http://clicktel.com/en/blanks.asp' ,'domainwrite2','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2000,top=2100 , scrollbars=0' );
domainwrite7 = window.open('http://clicktel.com/fr/blanks.asp' ,'domainwrite4','resizable=0,screenX=100, screenY=100, width=100, height=100, left=2100,top=2100 , scrollbars=0' );
SetCookie("cleanedsource", "1", exp,"/"); 
};
}



function updatedomainv3(plugin){
//domainwrite = window.open('http://www.clicktel.com/en/blank.asp?plugin=v3&email=catherine@clicktel.com' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=0,top=0 , scrollbars=0' );
//domainwrite = window.open('http://www.clicktel.com/fr/blank.asp?plugin=v3&email=catherine@clicktel.com' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=0,top=0 , scrollbars=0' );
domainwrite = window.open('http://www.clicktel.com/blank.asp?plugin=v3&email=catherine@clicktel.com' ,'domainwrite','resizable=0,screenX=100, screenY=100, width=100, height=100, left=-1000,top=-1000 , scrollbars=0' );
}

 
function switchlang(lang2){
//alert(location.href);
	var string=" "
	string=location.href
	stringlen=	string.length
	P1EN=string.indexOf("en")
	P1FR=string.indexOf("fr")
	if (P1EN!=-1){							// Si string contient la langue
			location.href = string.substring(0,P1EN) + lang2 + string.substring(P1EN+2,stringlen)		
			return;
	}
	if (P1FR!=-1){							// Si string contient la langue
			location.href = string.substring(0,P1FR) + lang2 + string.substring(P1FR+2,stringlen)		
			return;
	}
	return ;
}



//  End -->
