

function initNav() {
	if ((primaryNav != "") && (document.images[primaryNav] != null)) {
 		document.images[primaryNav].src = eval(primaryNav + "On.src");
	}
	if ((secondaryNav != "") && (document.images[secondaryNav] != null))  {
		document.images[secondaryNav].src = eval(secondaryNav + "On.src");
	}
	
}

function swapImage(image, state) {
	document.images[image].src = eval(image + state + ".src");
}

function Leaving(location) {
	if(confirm( 'You are now leaving the Actonel.com website. Links to other sites are provided as a convenience to the viewer.' )) {
		window.open(location);
	} 
}

function PopupImage(location, x, y) {
	window.open(location,null,"height=" + y + ",width=" + x + ",status=yes,toolbar=no,menubar=no,location=no");
}

function centerWindow(url, name, w, h, scroll, menu, resizable, szStatus)
{
	var fromLeft = 0;
	var fromTop = 0;
	
	if (window.screen)
	{
		fromLeft = ((screen.availWidth - w - 10) / 2);
 	 	fromTop = ((screen.availHeight - h - 30) / 2);
	}
	
	var winprops = 'width=' + w + ',height=' + h + ',left=' + fromLeft + ',top=' + fromTop + ',scrollbars=' + scroll + ',menubar=' + menu + ',resizable=' + resizable + ',status=' + szStatus;
	
	oHTMLWin = window.open(url, name, winprops);
	
	if(window.focus)
		oHTMLWin.window.focus();
	
	//window.location.href = "/index.jsp"
	//return oHTMLWin;
}

function centerWindowWithReturn(url, name, w, h, scroll, menu, resizable, szStatus)
{
	var fromLeft = 0;
	var fromTop = 0;
	
	if (window.screen)
	{
		fromLeft = ((screen.availWidth - w - 10) / 2);
 	 	fromTop = ((screen.availHeight - h - 30) / 2);
	}
	
	var winprops = 'width=' + w + ',height=' + h + ',left=' + fromLeft + ',top=' + fromTop + ',scrollbars=' + scroll + ',menubar=' + menu + ',resizable=' + resizable + ',status=' + szStatus;
	
	oHTMLWin = window.open(url, name, winprops);
	
	if(window.focus)
		oHTMLWin.window.focus();
	
	//window.location.href = "/index.jsp"
	return oHTMLWin;
}


function openInnerCenterPopup(url, name, w, h, scroll, resizable, title){

var fromLeft = 0;
var fromTop = 0;

if (window.screen)
{
	fromLeft = ((screen.availWidth - w - 10) / 2);
	fromTop = ((screen.availHeight - h - 30) / 2);
				}
var mywin=dhtmlwindow.open(name, "iframe", url, title, "width="+w+"px,height="+h+"px,resize="+resizable+",scrolling="+scroll+",center=1,left="+fromLeft+",top="+fromTop, "recal")
mywin.show();

	alert("Done");
	return mywin;
}

