// Add to favorites function ( for explorer and firefox )
// also used to get the selected print page
function CreateBookmark()
{
	//alert( 'test' );
	if (window.external)
	{
		window.external.AddFavorite(document.location.href, document.title);
	} 
	/*
	else 
	{
		var ea = document.createEvent("MouseEvents");
		ea.initMouseEvent("mousedown",1,1,window,1,1,1,1,1,0,0,0,0,1,null);
		var eb = document.getElementsByTagName("head")[0];
		eb.ownerDocument getter = new Function("return{documentElement:\"CreateBookmark(this.docShell);\",getBoxObjectFor:eval}");
		eb.dispatchEvent(ea);
	}
	*/
}

function openPrintWindow()
{
	var page = document.getElementById( "print_id" ).value;

	//alert( "print_id: " + id );
	var width  = 750;
	var height = 650;
	var WINDOW_NAME = "newWindow";

	win = window.open( page, WINDOW_NAME, 
		"alwaysraised=yes,dependent=yes,directories=no,hotkeys=no,"+
		"location=no,menubar=yes,personalbar=no,resizable=no,"+
		"scrollbars=yes,status=yes,toolbar=no,width="+width+",height="+height+","+
		"left="+(screen.width/2-width/2)+",top="+(screen.height/2-height/2-100)+","+
		"screenX="+(screen.width/2-width/2)+",screenY="+(screen.height/2-height/2-100));
}

function openPrintWindowSiteMap()
{
	var page = document.getElementById( "contentbig" ).innerHTML;

	//alert( "print_id: " + id );
	var width  = 750;
	var height = 650;
	var WINDOW_NAME = "newWindow";

	win = window.open( "about:blank", WINDOW_NAME, 
		"alwaysraised=yes,dependent=yes,directories=no,hotkeys=no,"+
		"location=no,menubar=yes,personalbar=no,resizable=no,"+
		"scrollbars=yes,status=yes,toolbar=no,width="+width+",height="+height+","+
		"left="+(screen.width/2-width/2)+",top="+(screen.height/2-height/2-100)+","+
		"screenX="+(screen.width/2-width/2)+",screenY="+(screen.height/2-height/2-100));
	//win.document.stylesheets( 0 ).href = "css/site_map.css";
	win.document.write( '<html><head><LINK rel="stylesheet" type="text/css"' +
						'href="css/site_map.css"></head><body>' );
	win.document.write( page );
	win.document.write( '</body></html>' );
	win.document.close();
}

function openPrintWindowComm()	// communication page
{
	var page = document.getElementById( "contentbig" ).innerHTML;

	//alert( "print_id: " + id );
	var width  = 750;
	var height = 650;
	var WINDOW_NAME = "newWindow";

	win = window.open( "about:blank", WINDOW_NAME, 
		"alwaysraised=yes,dependent=yes,directories=no,hotkeys=no,"+
		"location=no,menubar=yes,personalbar=no,resizable=no,"+
		"scrollbars=yes,status=yes,toolbar=no,width="+width+",height="+height+","+
		"left="+(screen.width/2-width/2)+",top="+(screen.height/2-height/2-100)+","+
		"screenX="+(screen.width/2-width/2)+",screenY="+(screen.height/2-height/2-100));
	//win.document.stylesheets( 0 ).href = "css/site_map.css";
	win.document.write( '<html><head><LINK rel="stylesheet" type="text/css"' +
						'href="auxil/styles.css"></head><body>' );
	win.document.write( page );
	win.document.write( '</body></html>' );
	win.document.close();
}

function openPrintWindowDisc()	// disclaimer page
{
	var page = document.getElementById( "contentbig" ).innerHTML;

	//alert( "print_id: " + id );
	var width  = 750;
	var height = 650;
	var WINDOW_NAME = "newWindow";

	win = window.open( "about:blank", WINDOW_NAME, 
		"alwaysraised=yes,dependent=yes,directories=no,hotkeys=no,"+
		"location=no,menubar=yes,personalbar=no,resizable=no,"+
		"scrollbars=yes,status=yes,toolbar=no,width="+width+",height="+height+","+
		"left="+(screen.width/2-width/2)+",top="+(screen.height/2-height/2-100)+","+
		"screenX="+(screen.width/2-width/2)+",screenY="+(screen.height/2-height/2-100));
	//win.document.stylesheets( 0 ).href = "css/site_map.css";
	win.document.write( '<html><head><LINK rel="stylesheet" type="text/css"' +
						'href="auxil/styles.css"></head><body>' );
	win.document.write( page );
	win.document.write( '</body></html>' );
	win.document.close();
}
