

/**** reload.js *****/

	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);


/********** preloadimages.js **************/
	var pgimages = new Array();
	function preloadImages(init){
	   for (x=0; x<preloadImages.arguments.length; x++) {
	   pgimages[x] = new Image();
	   pgimages[x].src = preloadImages.arguments[x];
	   }
	}

	/********* popwin *****************/
	function popupNew(mylink, windowname, theWidth, theHeight, status, resizable, scrollbars, toolbar, menubar, location) {
	    if (!window.focus) return true;
	    var href;
	    if (typeof (mylink) == 'string')
	        href = mylink;
	    else
	        href = mylink.href;
	    window.open(href, null, 'width=' + theWidth + ',height=' + theHeight + ',status=' + status + ', resizable=' + resizable + ', scrollbars=' + scrollbars + ', toolbar=' + toolbar + ',menubar=' + menubar + ',location=' + location);
	    return false;
	}
function popWin(thePage,theWidth,theHeight)
{
	if ( thePage.indexOf("http") >=0 ) {
		var proceed;

		if ( thePage.indexOf("media.vaneck.com") <0 ) {
		   if (thePage.indexOf("vaneck.com") < 0) {
		   	proceed = window.confirm('You are now loading content from an \nexternal website.  Van Eck assumes \nno liability for the content of any \nlinked sites.\n\nTo proceed, click OK.\nTo return to vaneck.com, click Cancel.\n\nPlease make sure your popup blocker is disabled.');
		   	if (proceed == false)
		   		return;
		   }
		}
	}



	var newWin=window.open(thePage,"VanEckGlobal","width=" + theWidth + ",height=" + theHeight + ",status=no,menubar=no,resizable=yes,scrollbars=yes");
	//newWin.focus();
}

function popWinLocal(thePage,theWidth,theHeight,webpage)
{
	if ( (thePage.indexOf("/offsite/") >= 0) || (thePage.indexOf("http://") >= 0) ) {
		var proceed;
		proceed = window.confirm('You are now loading content from an \nexternal website.  Van Eck assumes \nno liability for the content of any \nlinked sites.\n\nTo proceed, click OK.\nTo return to vaneck.com, click Cancel.\n\nPlease make sure your popup blocker is disabled.');
		if ( proceed == false )
			return;
	}
	var newWin=window.open(webpage,"VanEckGlobal","width=" + theWidth + ",height=" + theHeight + ",status=no,menubar=no,resizable=yes,scrollbars=yes");
	newWin.focus();
    }
/*************** Pop Up Video ***************/
var vid1 = null;
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	vid1 = window.open(URL,"vid1",'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=850,left=520,top=325');
	vid1.focus();
}/*************** Pop Up Video 2 ***************/
var vid2 = null;
function popUp2(URL) {
	day = new Date();
	id = day.getTime();
	vid2 = window.open(URL,"vid2",'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=680,height=350,left=300,top=125');
	vid2.focus();
}
/******** Display Other History **************/
function DisplayOtherHistory(divId){
	//alert('This function will toggle display of Monthly or quarterly Performance History ');
	//alert(divId);
	if (divId == 'M')
	{

		var content1=document.getElementById("M");
		content1.style.display = "none";
		document.getElementById("HeadM").className="BodyTextETFGreen";

		var content2=document.getElementById("Q");
		content2.style.display = "block";
		document.getElementById("HeadQ").className="currentETF";
	}
	else
	{

		var content1=document.getElementById("Q");
		content1.style.display = "none";
		document.getElementById("HeadQ").className="BodyTextETFGreen";

		var content2=document.getElementById("M");
		content2.style.display = "block";
		document.getElementById("HeadM").className="currentETF";
	}
}


/*********** Excel Function ************************/
function xlspopWin(thePage,theWidth,theHeight)

{
	if ( (thePage.indexOf("/dyndocs/") >= 0) ) {
		var proceed2;
		proceed2 = window.confirm('To access this file, please make sure your popup blocker is disabled.\n\n\nWhen prompted:\n\nChoose OPEN to view daily values.\n\nChoose SAVE for full Excel functionality or to print.\n');
		if ( proceed2 == false )
			return;
	}


	var newWin2=window.open(thePage,"VanEckGlobal","width=" + theWidth + ",height=" + theHeight + ",status=no,menubar=no,resizable=yes,scrollbars=yes");
	newWin2.focus();
    }


function change_box_Green(which)
{
	document.getElementById("GreenBox").style.display = 'block'
		document.getElementById("BlackBox").style.display = 'none'
}

function change_box_Black(which)
{
		document.getElementById("GreenBox").style.display = 'none'
		document.getElementById("BlackBox").style.display = 'block'
}
