﻿function openWin(url)
{
	aWindow=window.open(url,"thewindow","width=400,height=300,top=120,left=100");
}

var WinHandler;

function openWin2(url, width, height)
{
	var scrX, scrY
	scrX = screen.availWidth;
	scrY = screen.availHeight;
    scrX = scrX/2 - width/2
    scrY = scrY/2 - height/2
    
	if (WinHandler && !WinHandler.closed)
		WinHandler.close();

	WinHandler = window.open(url, '', 'top=' + scrY + ', left=' + scrX + ', width=' + width + ', height=' + height + ', menubar=no, status=no, location=no, resizable=yes, scrollbars=no')
	//WinHandler.moveTo (scrX ,scrY);

}

function bookmark()
{
	var title=document.title;
	var url=location.href;

	if (window.sidebar) 
	{
		window.sidebar.addPanel(title, url,"");
	}
	else if( window.opera && window.print )
	{
		var mbm = document.createElement('a');
		mbm.setAttribute('rel','sidebar');
		mbm.setAttribute('href',url);
		mbm.setAttribute('title',title);
		mbm.click();
	}
	else if( document.all ) 
	{
		window.external.AddFavorite( url, title);
	}
}

