
function isSmallClient(client)
{
                var smallClients=
                [
                               "153x130",

                               "176x220",

                               "240x320",

                               "320x320",

                               "480x640",
							   
                               "android",
							   
                               "avantgo",

                               "astel",

                               "benq",

                               "blackberry",

                               "blazer",
							   
                               "brew",
							   
                               "danger",

                               "dlib",

                               "docomo",

                               "elaine",

                               "eudoraweb",

                               "hiptop",
							  
							   "htc",
							   
							   "iemobile",
							   
							   "kwc-",
							   
                               "j2me",
							   
						       "lge-",
							   
							   "lg-",

                               "netfront",

                               "nokia",
							   
							   "nintendo",

                               "obigo",

                               "mda",

                               "midp",

                               "mmef20",

                               "mmp/2",

                               "mot-",

                               "mobile",
							 
							   "motorola",
							   
							   "mot-",

                               "newt",

                               "opera mini",

                               "palm",

                               "panasonic",

                               "pdxgw",

                               "philips",

                               "portalmmm",

                               "proxinet",

                               "pocket",

                               "sharp",

                               "sagem",

                               "samsung",

                               "sda",

                               "sec-",

                               "sie-",

                               "sgh-",

                               "small",

                               "sonyericsson",

                               "symbian",

                               "sharp-tq-gx10",

                               "ts21i-10",

                               "up.browser",

                               "up.link",

                               "vodafone",

                               "windows ce",

                               "winwap",

                               "wireless",

                               "xda"

                ];
                client=client.toLowerCase();

                for (var i=0;i<smallClients.length;i++)
                {
                               if (client.indexOf(smallClients[i])>=0)
                               {
                                               return true;
                               }
                }
                return false;
}

 

function isiPhoneClient(client)
{
                var smartClients=
                [
                               "iphone",
                               "ipod"
                ];
                client=client.toLowerCase();


                for (var i=0;i<smartClients.length;i++)
                {
                               if (client.indexOf(smartClients[i])>=0)
                               {
                               return true;
                               }
                }
                return false;

}

 

function isiPadClient(client)
{
                var iPadClient=
                [
                               "ipad"
                ];
                client=client.toLowerCase();


                for (var i=0;i<iPadClient.length;i++)
                {
                               if (client.indexOf(iPadClient[i])>=0)
                               {
                               return true;
                               }
                }
                return false;

}



function smallClient()
{
				if (isiPadClient(navigator.userAgent)==true)
				{
				 document.cookie="nomobile";
				 return;
				}
				
                else if (isSmallClient(navigator.userAgent)==true)
                {

                               if (document.location.hash=="#nomobile" && isSmallClient(navigator.userAgent)==true)
                               {
								document.cookie="nomobile";
								return;
                               }

                               else if (document.cookie && document.cookie.indexOf("nomobile")>=0)
                               {
								return;
                               }
							   else
							   {
								document.location="http://mobil.immonet.de";
							   }
                }

                else if (isiPhoneClient(navigator.userAgent)==true)
                {
                               if (document.location.hash=="#nomobile" && isiPhoneClient(navigator.userAgent)==true)
                               {
								document.cookie="nomobile";
								return;
                               }

                               else if (document.cookie && document.cookie.indexOf("nomobile")>=0)
                               {
								return;
                               }
							   else
							   {
								document.location="http://iphone.immonet.de";
							   }
                }
}

smallClient();

