curURL = document.URL;
if (curURL.match(/id=/i) != null) {
	appendURL = '&iphone=1'	
} else { appendURL = '?iphone=1'; }

// Redirect on iPhone
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
	 	
	if (document.cookie.indexOf("iphone_redirect=false") == -1 && curURL.substr((curURL.length-appendURL.length),curURL.length) != appendURL) {
		 
		newURL = curURL + appendURL;
		window.location = newURL;
	
	}
		
}
