function preloadImages( imageRoot )
{
  if (document.images) 
  {
  preloadPics( imageRoot+"siteicon",
      "home", "home_",
      "search", "search_",
      "sitemap", "sitemap_",
      "word", "word_",
      "exl", "exl_",
      "pdf", "pdf_",
      "arch", "arch_",
      "other", "other_"

  );
  
  preloadPics( imageRoot+"navigate",
      "nav_01", "nav_01_",
      "nav_02", "nav_02_",
      "nav_03", "nav_03_",
      "nav_04", "nav_04_",
      "nav_05", "nav_05_",
      "nav_06", "nav_06_",
      "nav_07", "nav_07_"
  );
  
  preloadPics( imageRoot+"wrapper",
      "mail", "mail_",
      "img_zoom", "img_zoom_"
  );

  preloadPics( imageRoot+"service",
    "select_button", "select_button_", "select_button__",
    "send_button", "send_button_", "send_button__",
    "search_button", "search_button_", "search_button__",
    "reg_button", "reg_button_", "reg_button__",
    "subscribe_button", "subscribe_button_", "subscribe_button__",
    "u_subscribe_button", "u_subscribe_button_", "u_subscribe_button__",
    "del_button", "del_button_", "del_button__",
    "order_button", "order_button_", "order_button__",
    "count_button", "count_button_", "count_button__",
    "enter_button", "enter_button_", "enter_button__"
  );


  }
  preloadFlag = true;
}


function popup_image(url, width, height, top, left){
	var h = screen.availHeight;
	var w = screen.availWidth;
	if(!h && !w)	{
		var h = screen.Height;
		var w = screen.width;
	}
	w = w - 100;
	h = h - 100;
	
	if((width > w) && (w > 0)) width = w;
	if((height > h) && (h > 0)) height = h;
	
	width = parseInt(width);
	height = parseInt(height);	
	
	width+= 20;
	
	var paddingTop=0;
  var paddingBottom=0;
  var paddingLeft=0;
  var paddingRight=0;
  if (typeof screen.availWidth != 'undefined' && typeof screen.availHeight != 'undefined')
  {
    if (typeof screen.availLeft != 'undefined' && typeof screen.availHeight != 'undefined')
    {
      var left = Math.max(0, Math.ceil(screen.availLeft + (screen.availWidth - width - paddingLeft - paddingRight) / 2));
      var top = Math.max(0, Math.ceil(screen.availTop + (screen.availHeight - height - paddingTop - paddingBottom) / 2));
    }
    else
    {
      var left = Math.max(0, Math.ceil((screen.availWidth - width - paddingLeft - paddingRight) / 2));
      var top = Math.max(0, Math.ceil((screen.availHeight - height - paddingTop - paddingBottom) / 2));
    }
  }
  else
  {
    var left = 0;
    var top = 0;
  }
  
	if(name==null) name='_blank';
	format = "top="+top+",left="+left+", height="+height+",width="+width+",status=yes,toolbar=no,scrollbars=yes,resizable=yes";
	var t = window.open(url,'_blank', format);
}
