function getQuerystring(key, default_)
 {
	  if (default_==null) default_=""; 
	  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
	  var qs = regex.exec(window.location.href);
	  if(qs == null)
		return default_;
	  else
		return qs[1];
 }


if( getQuerystring("homepage") == "" )
{   
if( navigator.userAgent.match(/iPhone/i) )
{
	  window.location = "http://www.pch.com/iphone/Default.aspx#_home"
}
else if(    navigator.userAgent.match(/blackberry/i) ||
			navigator.userAgent.match(/windows ce/i) ||
			navigator.userAgent.match(/opera mini/i) ||
			navigator.userAgent.match(/mobile/i) ||
			navigator.userAgent.match(/palm/i)   ||
	navigator.userAgent.match(/symbian/i) )
{ 
	 window.location = "http://www.pch.com/mobile/Home.aspx"
}
}
