function getStyle(el,styleProp)
{
  var x = document.getElementById(el);
  if (x.currentStyle)
    var y = x.currentStyle[styleProp];
  else if (window.getComputedStyle)
    var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
  return y;
}

function toggleElement(el_id) 
{
  var vStyle = getStyle(el_id, 'display');
  if (vStyle == 'none') {
  
    document.getElementById(el_id).style.display = "block";
  }
  if (vStyle == 'block') {
  
    document.getElementById(el_id).style.display = "none";
  }
}

function galleryopen(link) {

	newwin = window.open(link.href, "gallery_popup", "location=no,menubar=no,width=1000,height=700,scrollbars=yes,resizable=yes,top=5,left=5");
	newwin.focus();	
		
	return false;
}

function goImgWin(myImage, myWidth, myHeight, origLeft, origTop)
{
    myHeight += 24;
    myWidth += 24;

    TheImgWin = window.open(myImage,'image','height=' +
    myHeight + ',width=' + myWidth +
    ',toolbar=no,directories=no,status=no,' +
    'menubar=no,scrollbars=no,resizable=no');

    TheImgWin.resizeTo(myWidth+2, myHeight + 30);
    TheImgWin.moveTo(origLeft, origTop);
    TheImgWin.focus();
}

function go_there(link)
{
    var where_to = confirm("Are you sure ??");
    if (where_to == true) {
        window.location = link;
    }
}