function redirectSc(){
//This line defines the variable as the URL address without the 'http://' prefix or the specific file name 	
	var url =  window.location.hostname;

//This block of code tests the variable and if it matches the case, it redirects the browser to the location given
    window.location = 'https://professionalteethwhitening.com/~prosmile/shoppingcart/products.php';
}


function testCookie(){ //tests whether the cookie exists (visitor has entered their email)
var x = readCookie('cookie');
if (x) { //if the cookie exists, the redirect does not execute

}
else	 { //if neither the cookie nor the switch exists, redirect to shoppingcart

//This block of code tests the variable and if it matches the case, it redirects the browser to the location given
    setTimeout("redirectSc()", 90000); //sets a timer to 90 seconds (1.5 minutes) for the redirect to shoppingcart
}
}