﻿// JScript File

var newwindow
function openwindow(url){
	if(newwindow){newwindow.close}
	newwindow = window.open(url,'','top=1,left=1,height=600,width=700,scrollbars=yes,resizable=yes,menubar=yes')
	newwindow.focus()
}	

function calpopup(lnk) { 
	window.open(lnk, "calendar","height=250,width=250,scrollbars=no") 
} 

var showimage
function viewImage(url,height,width){
	height = height*1 + 40
	width = width*1 + 40
	if(showimage){showimage.close}
	showimage = window.open(url,'','top=1,left=1,height='+height+',width='+width+',scrollbars=yes,resizable=yes,menubar=no,status=no')
	showimage.focus()
}	


function SkipFunction(){
	//DO NOT REMOVE
	// this is so we can search for current viewImage function and replace with SkipFunction so LyteBox and Image Links don't Fail
}

function getQueryVariable(variable) 
{ 
    var query = window.location.search.substring(1); 
    var vars = query.split("&"); 
    for (var i=0;i<vars.length;i++) 
    { 
        var pair = vars[i].split("="); 
        if (pair[0] == variable) 
        { 
        return pair[1]; 
        } 
    } 
} 

function click(e)
{
    var message="Sorry, Right Click is disabled."; 
    if (document.all)
    {
        if (event.button == 2)
        {
            alert(message);
            return false;
        }
    }
    if (document.layers)
    {
        if (e.which == 3)
        {
            alert(message);
            return false;
        }
    }
}
if (document.layers) { document.captureEvents(Event.MOUSEDOWN); }
if(window.location.href.indexOf('ohiovalley', 0) <= 0) { document.onmousedown=click; }
