function getArguments(url) {

   var query = url.replace(/^[^\?]+\??/,'');

   var arguments = new Object ();

   if (!query) return(arguments);

   var pairs = query.split(/[;&]/);

   for (var i = 0; i < pairs.length; i++) {
      var KeyVal = pairs[i].split('=');
      if (!KeyVal || KeyVal.length != 2) continue;
      var key = unescape(KeyVal[0]);
      var val = unescape(KeyVal[1]);
      val = val.replace(/\+/g,' ');
      arguments[key] = val;
   }

   return(arguments);

}

function size(width,height) {

   this.width = 0;
   this.height = 0;
   this.aspect = aspect;

   if (typeof(window.innerWidth) == 'number') {
      this.width = window.innerWidth;
      this.height = window.innerHeight;
   } else {
      if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
         this.width = document.documentElement.clientWidth;
         this.height = document.documentElement.clientHeight;
      } else {
         if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
            this.width = document.body.clientWidth;
            this.height = document.body.clientHeight;
         }
      }
   }

}

function aspect(wf,hf) {

   var width = this.width / wf;
   var height = this.height / hf;

   if (width > height) {
      this.width = height * wf;
      this.height = height * hf;
   } else {
      this.width = width * wf;
      this.height = width * hf;
   }

   return;

}

function calcSize(size,percent) {

   var result = Math.round(size * (percent / 100));

   return(result);

}

function doWindow(source) {

   open(source,TARGET='_self');

   return;

}

function doAd(source) {

   open(source,TARGET='Webcam');

   return;

}

function textBoxStyle(offset,width,height,background,color,fontSize,lines) {

   var w = width;
   var h = (((fontSize * 1.25) * lines) - (fontSize * 0.25));

   var mt = (Math.round(h / 2) * -1) + (offset / 2);
   var ml = Math.round(w / 2) * -1;

   document.write("<style type='text/css' media='screen'>");
   document.write("<!--");
   document.write("body {");
   document.write(" margin: 0px;");
   if (background != '') document.write(" background: "+background+";");
   document.write("}");
   document.write("#content {");
   document.write(" font-family: Verdana, Geneva, Arial, sans-serif;");
   document.write(" background-color: transparent;");
   document.write(" text-align: center;");
   document.write(" margin-left: "+ml+"px;");
   document.write(" margin-top: "+mt+"px;");
   document.write(" position: absolute;");
   document.write(" left: 50%;");
   document.write(" top: 50%;");
   document.write(" width: "+w+"px;");
   document.write(" height: "+h+"px;");
   document.write(" visibility: visible");
   document.write("}");
   document.write(".bodytext {");
   document.write(" color: "+color+";");
   document.write(" font-size: "+fontSize+"px;");
   document.write("}");
   document.write("-->");
   document.write("</style>");

   return;

}

function mouseOver(sid) {

   var page = document.getElementById(sid);

   page.style.cursor = 'pointer';

}

function mouseOut(sid) {

   var page = document.getElementById(sid);

   page.style.cursor = 'default';

}

