﻿// JScript File

function showInfo(msg) {
    var mnu;

    if (self.innerWidth)
    {
	    frameWidth = self.innerWidth;
	    frameHeight = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientWidth)
    {
	    frameWidth = document.documentElement.clientWidth;
	    frameHeight = document.documentElement.clientHeight;
    }
    else if (document.body)
    {
	    frameWidth = document.body.clientWidth;
	    frameHeight = document.body.clientHeight;
    }
    else 
    {
        frameWidth = 600;
	    frameHeight = 500;
    }

    newWidth = frameWidth/2 - 150;
    newHeight = frameHeight/2 - 100;

    mnu = document.getElementById('__popinfo');

    if (mnu) { with (mnu.style) { left=newWidth + 'px'; top=newHeight +'px'; } } 
    mnu = document.getElementById('__popinfomessage');
    if (mnu) {mnu.innerHTML = msg; }
}

function hideInfomessage() {
  var mnuInfo;
  mnuInfo = document.getElementById('__popinfo');
  if (mnuInfo) { with (mnuInfo.style) { left='-900px'; top='-200px'; } } 
}

function Aanvraag(objID, type)
{
	s = "Aanvraag.aspx?oid=" + objID + "&type=" + type;
	window.name = 'svAanvraag';
	var v = window.open(s, 'viewdoc', 'width=400,height=600,scrollbars=no,toolbar=no,location=no,resizable=yes');
	v.setfocus;
}

function SetObjectPicture(file)
{
    var obj = document.getElementById('objectpic');
    if(obj){
        //obj.src='files/img/' + file;
        obj.src='Image.ashx?File=' + file;
    }
}


