// #################################################
// File: 			functions.js
// Application:		Metroside Javascript
// Author:			Richard Ramnac
// Created:			21-03-2001
// Last Updated:    21-03-2001
// #################################################

var strHead="display:''"

// Back 
function back(){
	history.go(-1);
}
// Last Modified
function lastModifed(){
	document.write ("Last Modified:" + document.lastModified);
}
// Home Button
function backHome(){
	window.location.href="default.asp";
}
// Popup Window
function popup(popupfile,winwidth,winheight,scrollbars){
	open(popupfile,"PopupWindow","resizable=no,height=" + winheight + ",width=" + winwidth + ",scrollbars=" + scrollbars);
}
// Status
function statusBar(){
	window.status = strTitle;
}
// Confirmation (and redirection)
function confirmMsg(msg,url) {
    if (confirm(msg)) 
		window.location = url;
}
// Alert
function alertMsg(cmd,url){
	alert(cmd);
	window.location.href=url;
}

// Pressable Buttons

function upeffect(cur){
if (document.all)
cur.className='overbutton'
}

function downeffect(cur){
if (document.all)
cur.className='downbutton'
}


function normaleffect(cur){
if (document.all)
cur.className='dhtmlbutton'
}

// Preview

function previewPage(form) {
var css = "body {font-size: 9pt; font-family:arial; margin:5px;}a:link {color:#4040FF; text-decoration:none;}a:active {color:#000080; text-decoration: none;}a:visited {color:#0000C0; text-decoration: none;}a:hover {text-decoration:underline;}hr.line {height:1px; color:#808080}DIV.header {height:8%;background:#6699CC;}DIV.body {height:77%;border:1px;}DIV.footer {font-size:80%;}table.standard {font-size:100%;}table.main {font-size:100%;}table.menu {font-size:100%; background:#F0F0F0;}table.bWhite {font-size:100%; border-color:#ffffff; padding:2; background:#6699CC;}td.topMenu {width:100px; height:10px; background:#ffffff; color:#000000; font-weight:bold; text-align:center;} td.menu {background:#F0F0F0;}td.date {font-size:80%; color:#ffffff;}td.cream {background:#F0F0F0;}td.iGrey {background:#cccccc;}td.mGrey {background:#BFBFBF;color:#ffffff;}td.dGrey {background:#808080;color:#ffffff;}table.title{background:#6699CC 100%;font-family:arial; color: #ffffff; font-size:100%; border-top: 2px outset #6699CC; border-left: 2px outset  #6699CC; border-right: 2px outset  #6699CC; border-bottom: 2px groove  #6699CC;}li.square {list-style-image: url('/metroside/data/images/square_01.gif');}li.arrow {list-style-image: url('/metroside/data/images/arrow_01.gif');}textarea.text {font-size:12px;font-family:tahoma;}td.loginIndent {text-indent:15px;}.mainheading {color:#000000; font-size:150%; font-family:Verdana; font-weight:bold;} .mainheading1 {color:#000000; font-size:150%; font-family:Verdana;font-weight:bold;}.mainheading2 {color:#000000; font-size:100%; font-family: Verdana; font-weight: bold;}.subheading {color: #6699CC;font-size: 100%;font-weight: bold;}.subheading2 {color: #6699CC;font-size: 80%;font-family: Verdana;font-weight: bold;} .subheading3 {color:#000000;font-size: 80%;font-family: Verdana;font-weight: bold;}";
var strPreview = form1.page.value;
win = window.open(", ", 'popup', 'toolbar = no, status = no, scrollbars = yes,');
win.document.writeln("<" + "html" + ">");
win.document.writeln("<" + "head" + ">");
win.document.writeln("<" + "style" + ">");
win.document.writeln("" + css + "");
win.document.writeln("</" + "style" + ">");
win.document.writeln("</" + "head" + ">");
win.document.writeln("<" + "body" + ">");
win.document.writeln("" + strPreview + "");
win.document.writeln("</" + "body" + ">");
win.document.writeln("</" + "html" + ">");
}

// Drop Down Menu

function dropMenu(header){
var strHead=header.style
if (strHead.display=="none")
	strHead.display=""
else
	strHead.display="none"
}

// Validate Bookmark form
function vbookmark() {
	if (document.form[1].value.length < 1) {
		alert("Please Enter A Site Name!");
	return false;
	}
	if (document.form[2].value.length == "" || document.form[2].value.indexOf('http', 0) == -1){
		alert("Please Enter The Full Web Address Including http:// or https://");
	return false;
	}
	if (document.form[4].value.length < 1) {
		alert("Please Provide Some Site Information");
	return false;
	}
} 


	