var mobileBrowsing = false;		//tracks if on mobile device
var deviceUsed = '';			//tracks what type of device
var screenW;					//final screen with
var screenH;					//final screen height
//var documentW;				//final document/window width
//var documentH;				//final document/window height

//get screen dimenstions
screenW = screen.width;
screenH = screen.height;

//get document dimenstions
//documentW = document.width;
//documentH = document.height;

//Some small calculation to get a prefer size for my page
if(screenW < screenH){
	screenH = screenW;
}
else{
	screenW = screenH;
}

//my images are no bigger than 1000, so I do not go higher than that
if(screenW > 1000){
	screenW = 1000;
}

//system information
//the "userAgent" is a string of information, I look for spcify peace of text within to know what type of device being use
if(navigator.userAgent.match(/Android/i)){
	//alert("android phone");
	deviceUsed = 'android';
	mobileBrowsing = true;
}
else if(navigator.userAgent.match(/webOS/i)){
	//alert("webOS");
	deviceUsed = 'webOS';
	mobileBrowsing = true;
}
else if(navigator.userAgent.match(/iPhone/i)){
	//alert("iPhone");
	deviceUsed = 'iPhone';
	mobileBrowsing = true;
}
else if(navigator.userAgent.match(/iPad/i)){
	//alert("iPad");
	deviceUsed = 'iPad';
	mobileBrowsing = true;
	screenW = 768;
	screenH = 768;
}
else if(navigator.userAgent.match(/iPod/i)){
	//alert("iPad");
	deviceUsed = 'iPod';
	mobileBrowsing = true;
}
else{
	//alert("normal browser");	
}
