function PrintPage(){	
	if (window.location.href.indexOf("?") == -1 ) { 
	openwin(window.location.href + '?mode=print',25,25);
	}else{
	  openwin(window.location.href + '&mode=print',25,25);  
	 }
    
}

function openwin(url, tmp3, tmp4){
	scn_w = screen.availwidth;
	scn_h = screen.availheight;
	pos_x = (scn_w - tmp3)/2 - 20;
	pos_y = (scn_h - tmp4)/2;
	show3 = window.open( url,'show','width='+ tmp3 +',height='+ tmp4 +',top='+ pos_y +',left='+ pos_x +',resizable=0,scrollbars=auto,directories=0,toolbar=0,menubar=0');
	window.show3.focus();
}

function ResizeContent(){
	var divh = document.getElementById('content').offsetHeight;
        document.getElementById('imagelinks').style.marginTop = (divh - 330) + "px";
}

function addResizeEvent(func) {
  var oldresize = window.onresize;
  if (typeof window.onresize != 'function') {
    window.onresize = func;
  } else {
    window.onresize = function() {
      oldresize();
      func();
    }
  }
}
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

addResizeEvent(ResizeContent);
addLoadEvent(ResizeContent);
