// WINOWSIZE ON HOME
function windowSizer() {
  if (top.frames.length!=0)
  top.location=self.document.location;
  self.moveTo(0,0)
  self.resizeTo(screen.availWidth,screen.availHeight)
}

// WINOPEN CODE
function winOpen(f, n, w, h) {
  w = window.open(f,n,'width='+w+',height='+h+',left='+(screen.width/2-w/2)+',top='+(screen.height/2-h/2)+',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
  w.focus();
}
function winFlashOpen(f, n, w, h) {
  w = window.open(f,n,'width='+w+',height='+h+',left='+(screen.width/2-w/2)+',top='+(screen.height/2-h/2)+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
  w.focus();
}

// STATUS CODE
function statusIn(text) {
  self.status = text;
}
function statusOut() {
  self.status = '';
}

// TD LINK
function linkTD(theCell) {
  var theATags = null;
  var location = null;

  if (typeof(document.getElementsByTagName) != 'undefined') {
    theATags = theCell.getElementsByTagName('a');
    if(typeof(theATags[0].getAttribute) != 'undefined') {
      if(theATags[0].getAttribute("target")!=null && theATags[0].getAttribute("target").length>0) {
        window.open(theATags[0].getAttribute('href'),theATags[0].getAttribute('target'));
      }
      else {
        document.location = theATags[0].getAttribute('href');
      }
    }
  }

  return false;
}

// FLASH FS-Commands
function myMovie_DoFSCommand(command, args) {
  var myMovieObj = navigator.appName.indexOf("Microsoft") != -1 ? myMovie : document.myMovie;
  // Commands
 	if (command == "FSwinOpen") {
    var args_pieces = args.split("!");
    winOpen(args_pieces[0], args_pieces[1], args_pieces[2], args_pieces[3])
 	}
 	if (command == "FSwinFlashOpen") {
    var args_pieces = args.split("!");
    winFlashOpen(args_pieces[0], args_pieces[1], args_pieces[2], args_pieces[3])
 	}
  //
}
//FLASH FS-Commands: Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub myMovie_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call myMovie_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('<\/SCRIPT\> \n');
}