
//Learn more about popUp
function openLearnEmail(URL){
LearnEmail=window.open(URL,"LearnEmail","width=480,height=300,left=200,top=200")
}


//Subscribe by mail popUp
function openSubByMail(URL){
SubByMail=window.open(URL,"SubByMail","width=580,height=500,left=200,top=200, scrollbars=yes")
}


//Figure, Author
function openGeneral(URL){
figure=window.open(URL,"figure"," resizable =0, width=540,height=540,left=5,top=5, scrollbars=no")
}

//Author
function openAuthor(URL){
figure=window.open(URL,"figure"," resizable =0, width=540,height=220,left=5,top=5, scrollbars=no")
}

//EndNote EndNotes
function endNote(URL, anchorURL) {
EndNote=window.open(URL,"EndNote", "resizable=0, width=540,height=540,left=5,top=5, scrollbars=no"); 
} 

//PrinterFriendly
function openPrint(URL){
Print=window.open(URL,"Print","width=680, height=550,left=5,top=5, resizable=yes, menubar=yes, scrollbars=yes");
}

//Related Resources
function openRelated(URL){
Related=window.open(URL,"Related","width=390, height=340,left=5,top=5, resizable=yes, menubar=yes, scrollbars=yes");
}


// target the window that opened the popup
//target opener
function mainGoto(URL){
opener.location.href = URL;
window.close();
}


//Navigation Dot Rollover

block1= new Image();
block2= new Image();
                                                
     
block1.src="graphics/spacer.gif";
block2.src="graphics/98_circle_on.gif";

               
	function display1(num){
                
		if (num=="100"){
			allOff('999');
			document.aDot.src=block2.src;                
                
		}else if (num=="200"){
			allOff('999');
			document.bDot.src=block2.src;
                
		}else if (num=="300"){
			allOff('999');
			document.cDot.src=block2.src;
                
		}else if (num=="400"){
			allOff('999');
			document.dDot.src=block2.src;
                
		}else if (num=="500"){
			allOff('999');
			document.eDot.src=block2.src;
                
		}else if (num=="600"){
			allOff('999');
			document.fDot.src=block2.src;
                
		}else if (num=="701"){
			allOff('999');
			document.gDot.src=block2.src;
                
		}else if (num=="702"){
			allOff('999');
			document.hDot.src=block2.src;
                
		}else if (num=="703"){
			allOff('999');
			document.iDot.src=block2.src;
                                               
		}
	}
                                                                      
	function allOff(num){
		if (num=="999"){
				
				try {
	                document.aDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.bDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.cDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.dDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.eDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.fDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.gDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.hDot.src=block1.src;
				}
				catch(oException) {}
				try {
	                document.iDot.src=block1.src;
				}
				catch(oException) {}
		}
	}


//This function makes sure that the images in an article are not wider than the text area.
function ImageResize()
{
	if (document.images['photo'] != null)
	{
		if (document.images['photo'].complete)
		{
			if( document.images['photo'].width > 375 )
			{
				document.images['photo'].width = 375;
			}
		}
		window.focus();
	}
}

//This function makes sure that figures and slides are not bigger than the box.
function FiguresResize()
{
	for( i = 1; i < 100; i++ ){
		if (document.images['photo'+i] != null){
			if (document.images['photo'+i].complete){
				if( document.images['photo'+i].width > 488 ){
					document.images['photo'+i].width = 488;
				}
				if( document.images['photo'+i].height > 385 ){
					document.images['photo'+i].height = 385;
				}
			}
			window.focus();
		}
	}
}

function PrintResize()
{
	for( i = 1; i < 100; i++ ){
		if (document.images['photo'+i] != null){
			if (document.images['photo'+i].complete){
				if( document.images['photo'+i].width > 375 ){
					document.images['photo'+i].width = 375;
				}
			}
			window.focus();
		}
	}
}


function makeArray(pages, urls) {
	var args = makeArray.arguments;
    for (var i = 0; i < args.length; i++) {
    	this[i] = args[i];
    }
	this.length = args.length;
}

function goPage(form, urls) {
	i = form.menu.selectedIndex;            
	if (i != 0) {
		parent.EndNote_main.location.href = urls[i];  
	}
}
