function openMarion() {
	window.open("marion.htm", 'Marion', 'height=675, width=650, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=yes');
}

function openLocation(loc) {
	if(loc=='surface_czech.htm'){
	window.open("locations/" + loc, 'Location', 'height=300, width=445, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=yes');
	}else{
	window.open("locations/" + loc, 'Location', 'height=250, width=445, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=yes');
	}
}

function openJobs() {
	window.open('https://www.bucyruslink.com/BIJobs/BucyrusLink/Employment/mxEmpHeader.jsp', 'BIJobs', 'height=720, width=850, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=yes');
}

function openPEAK() {
	window.open('PEAK.htm', 'PEAK', 'height=500, width=805, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=yes');
}
function closeDiv(name) {
			//if (event.srcElement.tagName == "DIV") {
	document.getElementById(name).style.display = "none";
	document.getElementById("floater").style.display = "none";
				//document.getElementById("ok").style.zindex = "2";    } else {
		        //nevermind, don't do anything
		   	// }
}

function openDiv(name) {
	document.getElementById(name).style.display = "block";
	document.getElementById("floater").style.display = "block";
}

/*

function openJobs() {
	var winURL = "jobs.htm";

	var options = 	"width=820," +
		"height=720," +
		"toolbar=no," +
		"menubar=no," +
		"scrollbars=no," +
		"resizable=yes," +
		"location=no," +
		"directories=no," +
		"status=yes";

	var jobs = window.open(winURL,'BIJobs', options);
}

*/
function openwin() {
		//if (navigator.appName == "Microsoft Internet Explorer") {
			//browserType = "ie";}
		//else if (navigator.appName == "Netscape") {
			//browserType = "ns";}
			
		//if (browserType == "ie") {
			window.open('125\\Preloader.html', 'newwindow', 'height=602, width=765, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no');
		//}
		//else if (browserType == "ns"){
			//window.open("http://www.bucyrus.com/Preloader.html", "newwindow","height=600, width=800, menu=0, scrollbars=0, resizable=1, status=0");}
}

function openStore() {
		window.open('store.htm', 'Store', 'width=435, height=400, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=no, directories=no, status=yes');
}

function openStoreE() {
		window.open('../store.htm', 'Store', 'width=435, height=400, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=no, directories=no, status=yes');
}

function openAQ() {
	window.open('newsletter.jsp?file=20070504-0.txt', 'Movie', 'height=435, width=395, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=yes');
}

function openFlash() {
	window.open("Flash.htm", 'Flash', 'height=250, width=450, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=yes');
}

function openPrivacy() {
	window.open("Privacy.htm", 'Privacy', 'height=250, width=450, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=yes');
}

function openContact(page, h, w) {
	window.open(page, 'Contact', 'height=' + h + ', width=' + w + ', toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=yes');
}

function launchPDF(file, name) {
//for flash - keep!
	window.open(file);
	VSLT(name);
}

function openSurvey() {
	window.open('WebSurvey.htm', 'BucyrusWebSurvey', 'height=600, width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=yes');
}

function showdrop(pid) {
		document.getElementById(pid).style.display = "block";
		document.getElementById(pid + "link").style.backgroundColor = "#7A1C3F";
}
function hidedrop(pid, bok) {
	if (bok == 0) {
		document.getElementById(pid).style.display = "none";
        document.getElementById(pid + "link").style.backgroundColor = "";
	}else{
		if (event.srcElement.tagName == "DIV") {
    	   document.getElementById(pid).style.display = "none";
    	   document.getElementById(pid + "link").style.backgroundColor = "";
		//document.getElementById("ok").style.zindex = "2";    } else {
   		}
   	}
}
function showOver(pid) {
	if (pid == "one") {
		document.getElementById("one").className="overLink";
		document.getElementById("two").className="outLink";
	}
	if (pid == "two") {
		document.getElementById("one").className="outLink";

		document.getElementById(pid).style.backgroundColor = "#CCCCCC";
		document.getElementById("one").style.backgroundColor = "";
		document.getElementById("three").style.backgroundColor = "";
		document.getElementById("four").style.backgroundColor = "";
	}
	if (pid == "three") {
		document.getElementById(pid).style.backgroundColor = "#CCCCCC";
		document.getElementById("two").style.backgroundColor = "";
		document.getElementById("one").style.backgroundColor = "";
		document.getElementById("four").style.backgroundColor = "";
	}
	if (pid == "four") {
		document.getElementById(pid).style.backgroundColor = "#CCCCCC";
		document.getElementById("two").style.backgroundColor = "";
		document.getElementById("three").style.backgroundColor = "";
		document.getElementById("one").style.backgroundColor = "";
		//document.getElementById("one").className="blueTD"
	}
}


function getexpirydate( nodays){
	var UTCstring;
	Today = new Date();
	nomilli=Date.parse(Today);
	Today.setTime(nomilli+nodays*24*60*60*1000);
	UTCstring = Today.toUTCString();
	return UTCstring;
}

function setCookie(category,email){
	document.cookie = "Category" + "=" + category + "; path=/";
	document.cookie = "Email" + "=" + email + "; path=/";
	if(!getCookie(category)){
		return false;
	}
	else{
		parent.document.location.href("../../inquiry.htm");
	}
}

function getCookie(cookiename) {
 var cookiestring=""+document.cookie;
 var index1=cookiestring.indexOf(cookiename);
 if (index1==-1 || cookiename=="") return ""; 
 var index2=cookiestring.indexOf(';',index1);
 if (index2==-1) index2=cookiestring.length; 
 return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}

function roll_over(img_name, img_src) {
   
   document[img_name].src = img_src;
}

function roll_out(img_name, img_src) {
   
   document[img_name].src = img_src;
}

