var iphone = navigator.userAgent && ( navigator.userAgent.match( /iPhone/i ) || navigator.userAgent.match( /iPod/i ) );

function iphoneCheckEn() {
	if ( iphone ) {
		if ( YAHOO.util.Cookie.get( 'iphone' ) == null ) {
			YAHOO.util.Cookie.set( 'iphone', '1');
			if ( confirm( "Use the iphone optimized StarsNews website ?" ) ) {
				window.location.href = "http://iphone.stars-news.info/index.en.html";	
			} 
		}	
	}
}
function iphoneCheckEs() {
	if ( iphone ) {
		if ( YAHOO.util.Cookie.get( 'iphone' ) == null ) {
			YAHOO.util.Cookie.set( 'iphone', '1');
			if ( confirm( "Utilizar el sitio web optimizado para iPhone ?" ) ) {
				window.location.href = "http://iphone.stars-news.info/index.es.html";	
			} 
		}	
	}
}
function iphoneCheckFr() {
	if ( iphone ) {
		if ( YAHOO.util.Cookie.get( 'iphone' ) == null ) {
			YAHOO.util.Cookie.set( 'iphone', '1');
			if ( confirm( "Utiliser le site StarsNews optimisée pour iPhone ?" ) ) {
				window.location.href = "http://iphone.stars-news.info/index.fr.html";	
			}
		}	
	}
}
function iphoneCheckPt() {
	if ( iphone ) {
		if ( YAHOO.util.Cookie.get( 'iphone' ) == null ) {
			YAHOO.util.Cookie.set( 'iphone', '1');
			if ( confirm( "Utilizar a versao optimizada para o iPhone ?" ) ) {
				window.location.href = "http://iphone.stars-news.info/index.pt.html";	
			}
		}	
	}
}
