// JavaScript Document

function fnC(N,Val){ /* create cookie */
	var t = new Date();
	t.setTime(t.getTime()+(365*24*60*60*1000));
	var s = ';expires='+t.toGMTString();
	document.cookie=N+'='+Val+s+';path=/';
}
function fnR(N){ /* read cookie */
	var a = document.cookie.split(';');
	for(var i=0;i<a.length;i++){
		var c=a[i].split('=');
		var strT=c[0].replace(/^\s+|\s+$/g,'');
		if(strT==N){return c[1];}
	}

	return null;
}


  var query = window.location.search;
  // Skip the leading ?, which should always be there,
  // but be careful anyway
  if (query.substring(0, 1) == '?') {
    query = query.substring(1);
  }
  if (query == 'fs') { fnC('fullsite','true'); }
  
  if (( fnR('fullsite') !== 'true') && ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) )) {
document.location = "http://m.samuelgilbert.info";
}
