//Navigation
function homeHover() {
	document.home.src = "images/nav/home_hover.png";
}
function homeOut() {
	document.home.src = "images/nav/home.png";
}

function galleryHover() {
	document.gallery.src = "images/nav/gallery_hover.png";
}
function galleryOut() {
	document.gallery.src = "images/nav/gallery.png";
}

function instrumentsHover() {
	document.instruments.src = "images/nav/instruments_hover.png";
}
function instrumentsOut() {
	document.instruments.src = "images/nav/instruments.png";
}

function resumeHover() {
	document.resume.src = "images/nav/resume_hover.png";
}
function resumeOut() {
	document.resume.src = "images/nav/resume.png";
}

function historyHover() {
	document.history.src = "images/nav/history_hover.png";
}
function historyOut() {
	document.history.src = "images/nav/history.png";
}

function statementHover() {
	document.statement.src = "images/nav/statement_hover.png";
}
function statementOut() {
	document.statement.src = "images/nav/statement.png";
}


//Confirm reset button on contact page
function resetConfirm() {
	var r=confirm("Are you sure you want to clear every field?");
	if (r==true) {
		document.forms.contactForm1.reset();
	} else {
	}
}
//Don't accept double quotes in contact field
function checkIt2(evt) {
    evt = (evt) ? evt : window.event
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if (charCode == 34) {
		alert("Sorry, you can't use double quotes in this textbox, as it causes an unknown error. Please use single quotes instead.");
        return false
    }
    return true
}

//Open gallery windows
function viewFull(location) {
	window.open(location,"_blank","location=no,menubar=no,scrollbars=yes,status=no,titlebar=no,toolbar=no");
}
//Open gallery info
function galleryInfo() {
	window.open("galleryInfo.php","_blank","location=no,menubar=no,scrollbars=yes,status=no,titlebar=no,toolbar=no,width=600,height=600");
}

//Don't accept double quotes in contact field
function checkIt2(evt) {
    evt = (evt) ? evt : window.event
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if (charCode == 34) {
		alert("Sorry, you can't use double quotes in this textbox, as it causes an unknown error. Please use single quotes instead.");
        return false
    }
    return true
}

//Opens window for sold pieces in gallery
function viewSold(galleryName) {
	window.open("galleryView.php?gallery=" + galleryName + "&sold=true","_self");
}
function viewSale(galleryName) {
	window.open("galleryView.php?gallery=" + galleryName,"_self");
}
