var pics = new Array();
var image_array = new Array();
var browser=navigator.appName
function preload_image(img,id,x,y)
{
  if (document.images) {
     pics[id]= new Image(x,y);
     pics[id].src = img;
     image_array[id] = img;
  }
}
function remove_thumbs()
{
  if (document.getElementById) {
    document.getElementById('placeholder').src = '/images/blank.gif';
  }
}
function show_thumb(whichpic) {
 if (document.getElementById && whichpic!=0) {
	document.getElementById('placeholder').src = pics[whichpic].src;
 }
}
function change_img(pic,id) {
  img = image_array[pic];
  n_style = 'url('+img+') top right no-repeat';
  document.getElementById(id).style.background = n_style;
}
function check_size() {
  y = get_hbrowser();
  h = 630;
  x = get_wbrowser();
  w = 1000;
  if (y <= h)
  {
	  document.getElementById('container').style.top = '0px';
  }
  else
  {
	  document.getElementById('container').style.top = ((y-h)/2)+'px';
  }
  if (x <= w)
  {
	  document.getElementById('container').style.left = '0px';
  }
  else
  {
	  document.getElementById('container').style.left = ((x-w)/2)+'px';
  }
}
function get_hbrowser()
{
	if (window.innerHeight)
	{
		return window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight != 0)
	{
		return document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		return document.body.clientHeight;
	}	
	return false;
}
function get_wbrowser()
{
	if (window.innerWidth)
	{
		return window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		return document.body.clientWidth;
	}	
	return false;
}
