/* =========================================================================

JavaScript Source File -- Created with SAPIEN Technologies PrimalScript 4.1

NAME: 

AUTHOR: 1 , 1
DATE  : 9/14/2009

COMMENT: 

============================================================================ */
function fn_detectmobile()
{
	var agent		= navigator.userAgent.toLowerCase();
	var appver		= navigator.appVersion.toLowerCase();
	
	var is_iphone	= (agent.indexOf('iphone') != -1);
	var is_wince	= (appver.indexOf('windows ce') != -1);
	
// 	alert ( "agent: " + agent );
// 	alert ( "appver: " + appver );
// 	alert ( "is_iphone: " + is_iphone );
// 	alert ( "is_wince: " + is_wince );
	
	if ( is_iphone )
	{
		window.location.href = "http://www.cmcsound.com/iphone.html";
	}
	else if ( is_wince )
	{
		window.location.href = "http://www.cmcsound.com/wince";
	}
}

