// *************************************
// Common.js Version 1.0 
// January 2007
//
// Develped exclusively for 
//     Rodriguez Funeral Home
//     by Jay Grubb dba Grubb Consulting Service (GCS) 
//

function SizeImage(imageName, xsize, ysize)
// Adjust the image 'imageName' to the user's screen resolution
// 'xsize' and 'ysize' are the size of the image in pixels
{
 		var xs = screen.availWidth / 1024 ;
		var ys = screen.availHeight / 736 ;	 
		if((xs < 1024 || xs > 1100) || (ys < 720 || ys > 800)) 
  	{
			 try {
					document.images[imageName].width = xsize * xs ; // x axis screen resolution adjustment
					document.images[imageName].height = ysize * ys ; // y axis screen resolution adjustment
			 }
			 catch(error) {
			 }	
	 	}
}

function FontSizeClass()
// Adjust the size of the base font given the user's screen resolution
{
 		
 		var xs = screen.availWidth ;
		var ys = screen.availHeight ;	 
		if(xs < 800 || ys < 500) 
        return "tinyfont" ;
	  else if(xs < 1000 || ys < 700) 
				return "smallfont" ;
	  else if(xs < 1150 || ys < 900) 
				return "normfont" ;
		else
				return "largefont" ;
}

function GetSizeAdj(varsize,bIsHoriz)
// Adjusts 'varsize' resolution
{
 		var xs = screen.availWidth / 1024 ;
		var ys = screen.availHeight / 736 ;	 
		if((xs < 1024 || xs > 1100) || (ys < 720 || ys > 800)) 
  	{
			  if(bIsHoriz)
			  	  varsize *= xs ; // x axis screen resolution adjustment
			  else
			  	  varsize *= ys ; // y axis screen resolution adjustment
		}
	  return varsize ;
}

