// JavaScript library for MPML


//image roll over 
<!--

function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }

//-->



//image rollover for use in form submit

//var imageA = [ "includes/login/sign-in-s.gif","includes/login/sign-in.gif"] ;
//var e = document.getElementsByName('log-img');
//e[0].onmouseover = function () { e[0].src = imageA[0] ; }
//e[0].onmouseout = function () { e[0].src = imageA[1] ; }


window.onload = function () {

var imageB = [ "includes/navbox/search-go-s.gif","includes/navbox/search-go.gif"] ;
var f = document.getElementsByName('search-go');
f[0].onmouseover = function () { f[0].src = imageB[0] ; }
f[0].onmouseout = function () { f[0].src = imageB[1] ; }

}


// back link
<!--
//var bl = new backlink();
//bl.write();
//-->


// navbox ajax

var please_wait = null;

function open_url(url, target) {
 	if ( ! document.getElementById) {
  		return false;
 	}

 	if (please_wait != null) {
  		document.getElementById(target).innerHTML = please_wait;
 	}

 	if (window.ActiveXObject) {
  		link = new ActiveXObject("Microsoft.XMLHTTP");
 	} else if (window.XMLHttpRequest) {
  		link = new XMLHttpRequest();
 	}

 	if (link == undefined) {
  		return false;
 	}
 	link.onreadystatechange = function() { response(url, target); }
 	link.open("GET", url, true);
 	link.send(null);
}

function response(url, target) {
 	if (link.readyState == 4) {
	 	document.getElementById(target).innerHTML = (link.status == 200) ? link.responseText : "Ooops!! A broken link! Please contact us with the following errorcode: " + link.status;
	}
}

function set_loading_message(msg) {
 	please_wait = msg;
}


function bookmark(id, select_index, title) {
var idA = id;
var select_indexA = select_index;
var titleA = title;
var url = "http://www.mnvideovault.org/index.php?id=" + idA + "&select_index=" + select_indexA + "&popup=yes"; 
var pageName = "Minnesota Video Vault | " + titleA; 
if(window.sidebar && window.sidebar.addPanel) {
        window.sidebar.addPanel(name,url,'');
} else if(window.opera && window.print) { 
        var e=document.createElement('a');
        e.setAttribute('href',url);
        e.setAttribute('title',name);
        e.setAttribute('rel','sidebar');
        e.click();
} else if(window.external) {
        try {
            window.external.AddFavorite(url,name);
        }
        catch(e){}
}
else
        alert("To add our website to your bookmarks use CTRL+D on Windows and Linux and Command+D on the Mac.");

}