//PrintLink

var path = window.location.pathname;
var SID = window.location.search;
// var print_link = "/tools/print_page/print.php?filepath=" + path + "&page=http://" + window.location.host + path;
var print_link = "/tools/print_page/print.php" + SID + "&filepath=" + path + "&page=http://" + window.location.host + path;

//MouseOver

var restoreArray = new Array;
var restoreCount = 0;
var restoreTimer = 0;
var restoreSpacer = 0;
var restoreText = 0;

function  preloadImages  ()
{
 if  (preloadArray == null)  return;
 var imageObject;
 var fileName;
 count = preloadArray.length;
 for (index=0; index<count; index++)
     {
     fileName = preloadArray [index];
     imageObject = new Image;
     imageObject.src = fileName; 
     preloadArray [index] = imageObject;
     }
}

function  replaceImage  (ImageName, FileName)
 {
 imageObject = eval ('document.' + ImageName);
 if  ((imageObject == null) || (FileName == null) || (FileName == ''))  return;
 if  (restoreArray != null)
     {
     restoreArray [restoreCount++] = imageObject.src;
     restoreArray [restoreCount++] = imageObject;
     }
 imageObject.src = FileName;
 }
 
function  restoreBoxes  ()
 {
 if  (restoreSpacer == 0 || restoreText == 0) {
 	restoreSpacer = document.getElementById("breadspacer").src;
	restoreText = document.getElementById("catName").innerHTML;
 }
 document.getElementById("breadspacer").src = restoreSpacer;
 document.getElementById("catName").innerHTML = restoreText;
 while (restoreCount > 0)
     {
     imageObject = restoreArray [--restoreCount];
     fileName = restoreArray [--restoreCount];
     if  ((imageObject != null) && (fileName != null) && (fileName != ''))  imageObject.src = fileName;
     }
 }
 
 
function  replaceBox  (ImageName, FileName, Category, spacer)
 {
 imageObject = eval ('document.' + ImageName);
 if  ((imageObject == null) || (FileName == null) || (FileName == ''))  return;
 if  (restoreArray != null)
     {
     restoreArray [restoreCount++] = imageObject.src;
     restoreArray [restoreCount++] = imageObject;
     }
 imageObject.src = FileName;
 if (spacer > 0) {
 document.getElementById("breadspacer").src = "/images/shared/breadcrumb/spacer"+spacer+".gif";
 document.getElementById("catName").innerHTML = Category;
 }
 } 

function  clearRestoreList  ()
 {
 restoreCount = 0;
 }

function  restoreImages  (DelaySeconds)
 {
 if  (restoreTimer > 0)
     {
     clearTimeout (restoreTimer);
     restoreTimer = 0;
     }
 if  ((restoreArray == null) || (restoreCount < 1))  return;
 if  (DelaySeconds > 0)
     {
     restoreTimer = window.setTimeout ('restoreImages ();', DelaySeconds * 1000);
     return;
     }
 while (restoreCount > 0)
     {
     imageObject = restoreArray [--restoreCount];
     fileName = restoreArray [--restoreCount];
     if  ((imageObject != null) && (fileName != null) && (fileName != ''))  imageObject.src = fileName;
     }
 }

function openWindowSize(address, width, height) {
	window_left  = Math.round(screen.availWidth  / 2) - Math.round(width  / 2);
	window_top   = Math.round(screen.availHeight / 2) - Math.round(height / 2);
	popUp = window.open(address, "", "width="+width+",height="+height+",left="+window_left+",top="+window_top + ",location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no");
	popUp.focus();
}

function openAnimation(which_url, which_name, features) {
	popup = window.open(which_url, which_name, features);
	popup.focus();
	return 1;
}

// start PopUp-Window 2 function
function openWindow2(which_url, which_name, features) {
	popup = window.open(which_url, which_name, features);
	popup.focus();
	return 1;
}
// start PopUp-Window function
function openWindow(URL) {
	newWindow = window.open(URL, 'print', 'width=640,height=560,scrollbars=yes,resizable=yes,menubar=yes,statusbar=yes');
	newWindow.focus();
}
function openWindownew(which_url, which_name, features) {
	window.open(which_url, which_name, features);
//	popup.focus();
// 	return 1;
}
// end PopUp-Window function


var win= null; // copyright 2001 - 2003 cyperfection by daniel bor
function NewWindow(url,name,w,h,scroll,menu,rezi,tool,stat,direct){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='menubar='+menu+',';
      settings +='resizable='+rezi+',';
      settings +='toolbar='+tool+',';
      settings +='status='+stat+',';
      settings +='directories='+direct+',';
          
  win=window.open(url,name,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

