function securityCheck(mystring) {
	if (mystring != "yes") {
		var redirect = location.protocol + "//" + location.host + "/members_only/login/?noauth=1&URL=" + location.pathname;
		window.location = redirect;
	}
}  // securityCheck

function securityRequest() {
	ajaxSendReq("GET", "/javascript/ajax/GDdigitalmagazine/IsAMember.asp", securityCheck);
}  // securityRequest

function sendSmartDevicesToHTML5()
{ 
	if(navigator.userAgent.match(/iPhone/i)) {
		if (document.cookie.indexOf("iphone_redirect=false") == -1) 
		{
			window.location = "hardcopy.pdf";
		}
	}
	
	if((navigator.userAgent.match(/iPod/i))|| 
			(navigator.userAgent.match(/iPad/i)) || 
			(navigator.userAgent.match(/Android/i)) 
			) {
		window.location = "files/html5/index.html"
	}
}

function sendSmartDevicesToPDF()
{ 
	if((navigator.userAgent.match(/iPhone/i))  || 
	 (navigator.userAgent.match(/iPod/i))|| 
	 (navigator.userAgent.match(/iPad/i)) || 
	 (navigator.userAgent.match(/Android/i)) 
	 ) {
	   if (document.cookie.indexOf("iphone_redirect=false") == -1) 
	   {
	   window.location = "hardcopy.pdf";
	   }
	}
}
