// LINK TARGET PREFERENCES

// Cookie Functions

function formrule(field)
{
	if (field.defaultValue == field.value) field.value = "";
}
function formrule2(field) {
  if (field.value == "") {
    field.value = field.defaultValue;
  }
}


function createCookie(name,value,days) {
 if (days) {
  var date = new Date();
  date.setTime(date.getTime()+(days*24*60*60*1000));
  var expires = "; expires="+date.toGMTString();
 }
 else var expires = "";
 document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
 var nameEQ = name + "=";
 var ca = document.cookie.split(';');
 for(var i=0;i < ca.length;i++) {
  var c = ca[i];
  while (c.charAt(0)==' ') c = c.substring(1,c.length);
  if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
 }
 return null;
}
function eraseCookie(name) {
 createCookie(name,"",-1);
}
// Checkbox Loader
function loadLinkPrefs () {
 if (readCookie("site_linkprefs_cookie")) {
  initVal = readCookie("site_linkprefs_cookie");
 } else {
  createCookie("site_linkprefs_cookie", true, 20000)
  initVal = true;
 }
 openBlank = initVal;
 setCheckbox(eval(initVal))
}
// Set Checkbox State
function setCheckbox(state) {
 openBlank = state;
 document.getElementById('linkprefs').checked = state;
 setTargets();
 createCookie("site_linkprefs_cookie", state, 20000)
}
// Configure Link Targets
function setTargets() {
 var link, l = 0;
 if (openBlank == true) {
  while (link = document.links[l++]) {
   // Omit all links starting with...
   if (link.href.indexOf('http://www.fuseddesign.com') == -1 && link.href.indexOf('http://fuseddesign.com') == -1 && link.href.indexOf('javascript') == -1) link.target = '_blank'; 
  }
 } else {
  while (link = document.links[l++]) {
   // Omit all links starting with...
   if (link.href.indexOf('http://www.fuseddesign.com') == -1 && link.href.indexOf('http://fuseddesign.com') == -1 && link.href.indexOf('javascript') == -1) link.target = '_top'; 
  }
 }
}
// Event Listener, by Scott Andrew
function addEvent(obj, evType, fn) {
 if (obj.addEventListener) {
  obj.addEventListener(evType, fn, true);
  return true;
 } else if (obj.attachEvent) {
  var r = obj.attachEvent('on'+evType, fn);
  return r;
 } else {
  return false;
 }
}

// --------------------------------------------------------
<!-- hide from old browsers Begin Clock
  function GetDay(intDay){
    var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", 
                         "Thursday", "Friday", "Saturday")
    return DayArray[intDay]
    }

  function GetMonth(intMonth){
    var MonthArray = new Array("January", "February", "March",
                               "April", "May", "June",
                               "July", "August", "September",
                               "October", "November", "December") 
    return MonthArray[intMonth] 	  	 
    }
  function getDateStrWithDOW(){
    var today = new Date()
    var year = today.getYear()
    if(year<1000) year+=1900
    var todayStr = GetDay(today.getDay()) + ", "
    todayStr += GetMonth(today.getMonth()) + " " + today.getDate()
    todayStr += ", " + year
    return todayStr
    }
//-->
<!--
var clockID = 0;

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var tDate = new Date();

if (tDate.getHours() == 0) { 
 if (tDate.getMinutes() < 10) {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = "12:0" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " am"; }
  else { document.theClock.theTime.value = "12:0" + tDate.getMinutes() + ":" + tDate.getSeconds() + " am"; }
 }
 else {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = "12:" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " am"; }
  else { document.theClock.theTime.value = "12:" + tDate.getMinutes() + ":" + tDate.getSeconds() + " am"; }
 }
}
else if (tDate.getHours() < 12) {
 if (tDate.getMinutes() < 10) {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = tDate.getHours() + ":0" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " am"; }
  else { document.theClock.theTime.value = tDate.getHours() + ":0" + tDate.getMinutes() + ":" + tDate.getSeconds() + " am"; }
 }
 else {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = tDate.getHours() + ":" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " am"; }
  else { document.theClock.theTime.value = tDate.getHours() + ":" + tDate.getMinutes() + ":" + tDate.getSeconds() + " am"; }
 }
}
else if (tDate.getHours() == 12) {
 if (tDate.getMinutes() < 10) {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = "12:0" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " pm"; }
  else { document.theClock.theTime.value = "12:0" + tDate.getMinutes() + ":" + tDate.getSeconds() + " pm"; }
 }
 else {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = "12:" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " pm"; }
  else { document.theClock.theTime.value = "12:" + tDate.getMinutes() + ":" + tDate.getSeconds() + " pm"; }
 }
}
else {
 if (tDate.getMinutes() < 10) {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = (tDate.getHours()-12) + ":0" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " pm"; }
  else { document.theClock.theTime.value = (tDate.getHours()-12) + ":0" + tDate.getMinutes() + ":" + tDate.getSeconds() + " pm"; }
 }
 else {
  if (tDate.getSeconds() < 10) { document.theClock.theTime.value = (tDate.getHours()-12) + ":" + tDate.getMinutes() + ":0" + tDate.getSeconds() + " pm"; }
  else { document.theClock.theTime.value = (tDate.getHours()-12) + ":" + tDate.getMinutes() + ":" + tDate.getSeconds() + " pm"; }
 }
}

   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}
//-->


// DEFAULT STATUS
defaultStatus = " Fused Design v1.0"

// --------------------------------------------------------
