function pop_win (url, win, width, height, options) 
{
	try {
		var leftPos = (screen.availWidth - width) / 2;
		var topPos = (screen.availHeight - height) / 2;
		options += 'width=' + width + ',height=' + height + ',left=' + leftPos + ',top=' + topPos;
		return window.open(url, win, options);
	} catch (e) {
		if (debugMode) alert(e);
	}
}

function refresh_href(class_name)
{
if (!document.getElementsByTagName) return false;
var links = document.getElementsByTagName("a");
for (var i=0; i < links.length; i++)
  {
    if (links[i].className.match(class_name))    
      {
      if (class_name!="close")
        {
          links[i].onclick=function()
            {
            return !pop_win(this.href,"zoom",800,600,"scrollbars=yes,statusbar=no,menubar=no");
            }
        }
          else
            {
            links[i].onclick=function()
              {
              return !window.close();
              }
            }
      }
  } 
}


function flash_insert(name,width,height)
{
document.write("<!--[if !IE]> -->");
document.write("<object type='application/x-shockwave-flash' data='./image/flash/"+name+".swf' width='"+width+"' height='"+height+"'><!-- <![endif]-->");
document.write("          <!--[if IE]>");
document.write("          <object id='flash' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' wmode='transparent' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+width+"' height='"+height+"'>");
document.write("          <param name='movie' value='./image/flash/"+name+".swf' />");
document.write("          <!--><!---->");
document.write("          <param name='loop' value='true' />");
document.write("          <param name='menu' value='true' />");
document.write("          <param name='wmode' value='transparent' />");
document.write("          </object>");
document.write("        <!-- <![endif]-->");
}


