

/*

	--------------------- MJS GLOBAL JS INCLUDE ---------------------

	

	New Global Include for JS, Combining All Old Includes

	

	Last Updated: 11/3/2005 - 12:00 PM

	Last Updated By: Dennis Jenders

	

	Includes:

	- PopUp Functions

	- E-Mail Story Functions

	- View Toggle Functions

	

	History:

	- Feedroom (11/3/2005) - REMOVED: Legacy Code

	- KRT (11/3/2005) - REMOVED: Duplicate



	-----------------------------------------------------------------

*/



/* --------------------- POPUPS INCLUDE --------------------- */



/*  

CREATE THE LINK IN THIS FORMAT:

a href="javascript:launchpopup('http://www.onwisconsin.com/','winpopup',true,800,360);"

PARAMETERS TO CHANGE: the URL, whether or not to show scrollbars and menu, width, and height

 */



function launchpopup(url, name, rs, w, h) {

  var resize = "";

  if (rs) {

    resize = "resizable,";

  }

  popupWin = window.open(url, name, 'scrollbars,menubar,' + resize + 'width=' + w + ',height=' + h);

}





function launchpopup02(url, name, rs, w, h) {

  var resize = "";

  if (rs) {

    resize = "resizable,";

  }

  popupWin = window.open(url, name, 'scrollbars,' + resize + 'width=' + w + ',height=' + h);

}



function launchpopup03(url, name, rs, w, h) {

  var resize = "";

  if (rs) {

    resize = "resizable,";

  }

  popupWin = window.open(url, name, '' + resize + 'width=' + w + ',height=' + h);

}



function poppoll(url, name, rs, w, h) {

  var resize = "resizable=no,";

  if (rs) {

    resize = "resizable=yes,";

  }

  popupWin = window.open(url, name, 'location=no,menubar=no,toolbar=no,scrollbars=no,status=no,' + resize + 'width=' + w + ',height=' + h);

}



function launchvideo(url, name, rs, w, h) {

  var resize = "";

  if (rs) {

    resize = "resizable,";

  }

  popupWin = window.open(url, name, 'scrollbars,menubar,' + resize + 'width=' + w + ',height=' + h);

}



/* SCRIPT RESERVED FOR KRT POPOUT GRAPHICS */



function MM_openBrWindow(theURL,winName,features) { //v1.2

	newWin = window.open(theURL,winName,features);

	newWin.focus()

}



function getCookie(name)

{

    var dc = document.cookie;

    var prefix = name + "=";

    var begin = dc.indexOf("; " + prefix);

    if (begin == -1)

    {

        begin = dc.indexOf(prefix);

        if (begin != 0) return null;

    }

    else

    {

        begin += 2;

    }

    var end = document.cookie.indexOf(";", begin);

    if (end == -1)

    {

        end = dc.length;

    }

    return unescape(dc.substring(begin + prefix.length, end));

}



/* --------------------- E-MAIL STORY INCLUDE --------------------- */



function newwin()

	{

		var newWindow = window.open('http://www.journalinteractive.com/utilities/emailstory.asp?url=' + escape(window.location.href),'send','toolbar=0,menubar=0,scrolling=no,scrollbars=yes,resizable=yes,width=280,height=530');

	

		if (newWindow.opener == null) {

			newWindow.opener = self;

		}

	}

	

/* --------------------- VIEW TOGGLE INCLUDE --------------------- */



function show(id) {

	document.getElementById(id).style.display = 'block';

}



function hide(id) {

	document.getElementById(id).style.display = 'none';

}



/* TMJ4 2006 VIDEO POPUP */

function winopen(sUrl, sTitle, sWidth, sHeight)

			{

				var win = window.open(sUrl, sTitle, 

				'width=' + sWidth + ', height=' + sHeight + ', ' +

				'location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no');

			}
