﻿function MyFunc()
{
//$var = window.location.pathname;
//alert($var);
$pathname = encodeURIComponent(window.location.pathname);

mywindow = window.open("oosnotify/oosnotify.htm?pathname=" + $pathname,"mywindow","width=400,height=200,location=1,resizable=1");
//mywindow.moveTo(250,250);
}

function OpenOOSNotify()
{
//$var = window.location.pathname;
//alert($var);
$pathname = encodeURIComponent(window.location.pathname);

var w = 400;
var h = 150;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
mywindow = window.open("oosnotify/oosnotify.htm?pathname=" + $pathname,"",'location=1,resizable=1, width='+w+', height='+h+', top='+top+', left='+left);
//mywindow.moveTo(250,250);
}

function get_array() {
  var vars = [], hash;
  var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
  for(var i = 0; i < hashes.length; i++) {
    hash = hashes[i].split('=');
    vars.push(hash[0]);
    vars[hash[0]] = hash[1];
  }
  //alert(decodeURIComponent(vars["pathname"]));
  //document.form1.elements.text1.value = "wtf"
  document.oos_submit.elements.url.value = decodeURIComponent(vars["pathname"])
  //alert(document.form1.elements.hidden1.value);
  return vars;
}