
var tabs = new Array();
tabs[0] = 'search_mindspring';
tabs[1] = 'search_web';
function switch_search(tab){
for(var i = 0; i < tabs.length; i++) {
if(i == tab) {
document.getElementById(tabs[i]).style.display = 'block';
} else {
document.getElementById(tabs[i]).style.display = 'none';
}
}
}

function doInputMouseOver(input) {
if(input.getAttribute('baseClassName') == null) {
if(input.className != '') {
input.setAttribute('baseClassName', input.className);
}
}

if(input.getAttribute('isFocused') != 'true') {
input.className = input.getAttribute('baseClassName') + '_over';
}
}

function doInputMouseOut(input) {
if(input.getAttribute('isFocused') != 'true') {
input.className = input.getAttribute('baseClassName');
}
}

function doInputFocus(input) {
input.setAttribute('isFocused', 'true');

if(input.getAttribute('baseClassName') == null ) {
if(input.className != '') {
input.setAttribute('baseClassName', input.className);
}
}

if(input.value == input.defaultValue) {
input.value = '';
}

input.className = input.getAttribute('baseClassName') + '_focus';
}

function doInputBlur(input) {
input.setAttribute('isFocused', 'false');

if(input.value == '' && input.defaultValue) {
input.value = input.defaultValue;
}

input.className = input.getAttribute('baseClassName');
}



function switch_image(id, image_path){
document.getElementById(id).src = image_path;
}

function browser_bar_class() {
this.save = function(url, title) {
if(window.sidebar) {
if(!title) {
title = url
}
window.sidebar.addPanel(title, url, '');
} else if(window.external) {
if(title) {
window.external.addFavorite(url, title);
} else {
window.external.addFavorite(url);
}
} else if(window.opera && window.print) {
if(!title) {
title = url
}
var tmp = document.createElement('a');
tmp.setAttribute('rel', 'sidebar');
tmp.setAttribute('href', url);
tmp.setAttribute('title', title);
tmp.click();
} else {
alert('The Link to Bookmark is:\n' + url);
}
}
this.print = function(url){
myRef = window.open(url, 'printwin', 'left=20,top=20,width=675,height=650,toolbar=0,resizable=1,location=0,menubar=0,scrollbars=1');
}
}
var browser_bar = new browser_bar_class();
function toggle_page_email(toggle){
if(toggle == 'open'){
document.getElementById('page_overlay').style.display = 'block';
document.getElementById('email_box').style.display = 'block';
document.getElementById('page_email').style.display = 'block';
document.getElementById('page_overlay').style.height = document.getElementById('footer').offsetTop + document.getElementById('footer').offsetHeight + 'px';
}else{
document.getElementById('page_overlay').style.display = 'none';
document.getElementById('email_box').style.display = 'none';
document.getElementById('email_sent').style.display = 'none';
}
}

function page_email(location) {
var http_process = new ajax();
form = document.getElementById('page_email');
if( location == '' || location == undefined){
location = window.location;
}
http_process.send(location, 'share=true&your_name=' + escape(form.your_name.value) + '&your_email=' + form.your_email.value + '&message=' + escape(form.message.value) + '&recipient=' + form.recipient.value + '&url=' + window.location);
document.getElementById('email_box').style.display = 'none';
document.getElementById('email_sent').style.display = 'block';
window.setTimeout('close_page_email()', 2000);
}

function close_page_email(){
form = document.getElementById('page_email');
form.your_name.value = '';
form.your_email.value = '';
form.recipient.value = '';
form.message.value = '';
toggle_page_email();
}
