function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function pageup(e) {
UAGENT = navigator.userAgent.toUpperCase();
if (UAGENT.indexOf("MSIE") >=0) { posi = event.y; }
else { posi = e.pageY; }
moveObje(posi);
}
	
function moveObje(position) {
move = position / 10;
point = parseInt(position - move);
scrollTo(0,point);
if (point > 0) { setTimeout("moveObje(point)",10); }
}

window.onload = function() {
var node_a = document.getElementsByTagName('a');
for (var i in node_a) {
if (node_a[i].className == 'newwin') {
node_a[i].onclick = function() {
window.open(this.href, '', '');
return false;
};
}
}
};

function limit(target, maxlength, outtarget) {
    if ( target.value.length > maxlength ) {
        outtarget.focus();
        target.value = target.value.substr(0, maxlength);
    }
    target.focus();
}


function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) {
				a.disabled = false;
				if(title == "small"){
					document.images["imgsml"].src = ssimg[2].src;
				}else if(title == "default"){
					document.images["imgmdl"].src = ssimg[4].src;
				}else if(title == "large"){
					document.images["imglrg"].src = ssimg[6].src;
				}
			}else{
				if(a.getAttribute("title") == "small"){
					document.images["imgsml"].src = ssimg[1].src;
				}else if(a.getAttribute("title") == "default"){
					document.images["imgmdl"].src = ssimg[3].src;
				}else if(a.getAttribute("title") == "large"){
					document.images["imglrg"].src = ssimg[5].src;
				}
			}
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

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 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;
}

window.onload = function(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}
