/* *****************************************************************
Name : google_site_search
Version : 1.0
Author : Gavin Smith
Created : 05/19/2009
Description: Contains standard site search code. Include on any
: page that has a search box
***************************************************************** */
function SetSearchBackground()
{
var f = document.getElementById('cse-search-box');
if (f)
{
var q = document.getElementById('q');
var n = navigator;
var l = location;
if (n.platform == 'Win32')
{
q.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;';
}
var b = function()
{
if (q.value == '')
{
q.style.background = '#FFFFFF url(http:\x2F\x2Fwww.google.com\x2Fcoop\x2Fintl\x2Fen\x2Fimages\x2Fgoogle_custom_search_watermark.gif) left no-repeat';
}
};
var f = function()
{
q.style.background = '#ffffff';
};
q.onfocus = f;
q.onblur = b;
if (!/[&?]q=[^&]/.test(l.search))
{
b();
}
}
}
function SubmitOnEnter(myfield, e)
{
var keycode;
if (window.event)
keycode = window.event.keyCode;
else if (e)
keycode = e.which;
else
return true;
if (keycode == 13)
{
googlesearch();
return false;
}
else
return true;
}
function SubmitOnEnternewlook(myfield, e)
{
var keycode;
if (window.event)
keycode = window.event.keyCode;
else if (e)
keycode = e.which;
else
return true;
if (keycode == 13)
{
googlesearchnewlook();
return false;
}
else
return true;
}
googlesearch = function()
{
/*
window.location=
'http://www.shoreline.edu/Search.aspx?q=' +
escape(document.getElementById('q').value) +
'&cx=015329721119690393978:cdpqebfl09w&cof=FORID:11&sa=Search';
*/
window.location=
'http://www.shoreline.edu/search?q=' +
escape(document.getElementById('q').value);
}
googlesearchnewlook = function()
{
/*
window.location=
'http://www.shoreline.edu/Search.aspx?q=' +
escape(document.getElementById('q').value) +
'&cx=015329721119690393978:cdpqebfl09w&cof=FORID:11&sa=Search';
*/
window.location=
'http://www.shoreline.edu/search?q=' +
escape(document.getElementById('q').value);
}
function makeDoubleDelegate(function1, function2) {
return function() {
if (function1)
function1();
if (function2)
function2();
}
}
//-----------------------------------------------------------------------------------------------
//-- Rotating Image Code
//-----------------------------------------------------------------------------------------------
// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.
function ImgOnClick()
{
url = ImgLink.href;
window.open(url,"PopupWindow","width=350,height=370,scrollbars=1");
return false;
}
function runSlideShow()
{
if (document.all)
{
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();
}
document.images.PictureBox.src = preLoad[jss].src;
var ImgLink = document.getElementById("ImgLink");
var ImgRef = document.getElementById("ImgRef");
ImgLink.href = Link[jss];
ImgRef.alt = Alt[jss];
ImgLink.onclick = ImgOnClick;
// if (document.getElementById)
// document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all)
document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss))
jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
/* *****************************************************************
Name : mm_rollovers
Version : 1.0
Author : Gavin Smith
Created : 05/19/2009
Description: Contains standard Macromedia Rollover code. Include on
: any page that uses rollovers.
***************************************************************** */
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i