function wlocation(url)
{
	window.location = url;
}

function openerLocation(url)
{
	opener.wlocation(url);		
}

function newWindow(page,target,winLoc,h,w,scroll,menu,tool,resize) 
{
    // Clicking on a link opens a new window with specified properties
    var dw=60
    var dh=60
    // Determine location of window
    if (winLoc == 'center') 
    {
		var posx=(screen.width - (w+dw))/2
		var posy=(screen.height - (h+dh))/2
    }
    else if (winLoc == 'lowright') 
    {
		var posx=(screen.width - (w+dw))
		var posy=(screen.height - (h+dh))
    }
    else if (winLoc == 'upright') 
    {
		var posx=(screen.width - (w+dw))
		var posy=0
    }
    else if (winLoc == 'lowleft') 
    {
		var posx=0
		var posy=(screen.height - (h+dh))
    }
    else if (winLoc == 'upleft') 
    {
		var posx=0
		var posy=0
    }
    
    // Set window properties
    windowprops =	"height=" + h + ",width=" + w + ",location=no, left=" + posx + ",screenx=" + posx + ",top=" + posy +
					",screeny=" + posy + ",scrollbars=" + scroll + ",menubars=" + menu + ",toolbars=" + tool + ",resizable=" + resize;
    
    // Open new window
    var Thewin=window.open(page, target, windowprops);
    Thewin.opener= window;
    //window.name = 'opener'
    Thewin.opener.name = 'opener';
    Thewin.focus();
    return false;
}
