//document.write("all");

function SPONgetCookie (name)
{
function SPONgetCookieVal (offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return SPONgetCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

var spMobileClients1=[
"android", 
"avantgo",
"blackberry",
"blazer",
"compal",
"elaine",
"fennec",
"hiptop",
"iemobile",
"ipod",
"iris",
"kindle",
"lge ",
"maemo",
"midp",
"mmp",
"mobi",
"mini",
"palm",
"phone",
"pixi",
"pre",
"plucker",
"pocket",
"psp",
"symbian",
"treo",
"vodafone",
"wap",
"xda",
"xiino",
"midp",
"240x320",
"netfront",
"nokia",
"panasonic",
"portalmmm",
"sharp",
"sie-",
"sonyericsson",
"benq",
"mda",
"mot-",
"philips",
"pocket pc",
"sagem",
"samsung",
"sda",
"sgh-",
"iphone"
];

var spMobileClients=[
 "symbianos",
 "android",
 "iphone"
];

function spIsMobileClient(userAgent) {
try {
userAgent=userAgent.toLowerCase();
for (var i=0; i < spMobileClients.length; i++)
if (userAgent.indexOf(spMobileClients[i]) != -1)
return true;
}
catch (e) { // pssst.
}
//document.write( userAgent );
return false;
}
function spIsThisBrowserMobileClient() {
return spIsMobileClient(navigator.userAgent);
}
function spRedirectIfMobileClient() {
try {
if (spIsThisBrowserMobileClient()) {
if (document.location.href.indexOf('nomobile') != -1) {
document.cookie='nomobile';
return;
}
if (document.cookie && document.cookie.indexOf('nomobile') != -1)
return;
 if (document.location.search.match(/\?/)) {
  document.location.href= document.location.search + "&mobileclient=1";
 } else {
  document.location.href= document.location.search + "?mobileclient=1";
 }
}
}
catch (e) {
}
}

var loc = document.URL;
var loc2=loc.match(/mobileclient/);
//alert(loc2);
if (loc2 != 'mobileclient') {
//document.write("LOC: "+ loc);     
spRedirectIfMobileClient();
}
//spRedirectIfMobileClient();



