// Used for File popups on the site WITHOUT SCROLLBARS
/* Example on usage:
 * Format:  <a href='javascript:popupFile("URL",width,height);'>LinkText</a>
 * Example: <a href='javascript:popupFile("http://www.3m.com/us/office/meetings/vo/vo.html",720,500);'>LinkText</a>
 */
function popupFile(fileURL,fileWidth,fileHeight) {
	// Width & Height of your Flash Document
	var sx = fileWidth;
	var sy = fileHeight;
	// Position the window in the Middle of the Screen
	var winl = (screen.width-sx)/2;
	var wint = (screen.height-sy)/2;
	// The following two lines prevents an IE error.
	popupwin=window.open("","NewWindow","top="+wint+",left="+winl+",width=200,height=200");
	popupwin.window.close();
	popupwin=window.open(fileURL,"NewWindow","toolbar=no,location=no,scrollbars=no,directories=no,status=no,menubar=no,top="+wint+",left="+winl+",width="+sx+",height="+sy+"");
	popupwin.window.focus();
}


/* The followin javascript is used for metrics on the lower navigation on all post-it pages. */

var fnArray = new Array();

function defineFNArray() {
	fnArray[0] = new Array(""); // Add to Favorites
	fnArray[1] = new Array("Notes"); // Notes
	fnArray[2] = new Array("Flags"); // Flags
	fnArray[3] = new Array("Dispensers"); // Dispensers
	fnArray[4] = new Array("Pockets"); // Pockets	
	fnArray[5] = new Array("Easel"); // Easel
	fnArray[6] = new Array("Bulletin Boards"); // Bulletin Boards
	fnArray[7] = new Array("Educational"); // Educational
	fnArray[8] = new Array("Digital"); // Digital
	fnArray[9] = new Array("Photo Paper"); // Photo Paper
	fnArray[10] = new Array("Sustainability"); // Sustainability	
	fnArray[11] = new Array("Post-it History"); // History
	fnArray[12] = new Array("Mypost-itsecret.com"); // Mypost-itsecret
	fnArray[13] = new Array("Post-itstyle.com"); // Post-itstyle
	fnArray[14] = new Array("Youtube.com/postitnotes"); // Youtube
	fnArray[15] = new Array("Post-it Perks!"); // Perks
	fnArray[16] = new Array("Offers"); // Offers
	fnArray[17] = new Array("Custom Printed Products"); // Custom Printed Products
	fnArray[18] = new Array("Ergonomic Solutions"); // Ergonomic
	fnArray[19] = new Array("3M Racing"); // Racing
	fnArray[20] = new Array("FAQ"); // FAQ
	fnArray[21] = new Array("Legal"); // Legal
	fnArray[22] = new Array("Privacy Policy"); // Privacy
	fnArray[23] = new Array("Feedback"); // Feedback
	fnArray[24] = new Array("Contact Us"); // Contact
	fnArray[25] = new Array("Post-it.com"); // Post-it.com
	fnArray[26] = new Array("WTB"); // Where to Buy
}

function footerOnRelease(targetIndex) {
	var itemToTrack = fnArray[targetIndex];
	if (itemToTrack != undefined) {
		dcsMultiTrack('WT.cg_n', 'Footer Nav', 'WT.cg_s', itemToTrack, 'WT.ac', ' Footer Nav - ' + itemToTrack);
	} else {
		// alert("footerOnRelease: " + fnArray[targetIndex]);
	}
}

defineFNArray();
