﻿// JScript File
// the functions in this file require the supplementary library lib.js

// These defaults should be changed the way it best fits your site
var _POPUP_FEATURES = 'location=0,statusbar=0,menubar=0,scroll=1,width=250,height=250';

var myWindow;
function openCenteredWindow(url) {
    var width = 415;
    var height = 600;
 //   var outerWidth = 400;
//    var outerHeight = 290;
    var innerWidth = 400;
    var innerHeight = 285;
    var left = parseInt((screen.availWidth/2) - (width/2));
   // var top = parseInt((screen.availHeight/2) - (height/2));
   var top = parseInt(((screen.availHeight/2) - (height/2))-75);
    var windowFeatures = "innerWidth=" + innerWidth + ",innerHeight=" + innerHeight + ",width=" + width + ",height=" + height + ",location=no,status=no,menubar=no,scroll=yes,titlebar=no,toolbar=no,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, "subWind", windowFeatures);
}

function checkBrowserWidth()
{
	var w = getBrowserWidth();
	
	return w;
};


function getBrowserWidth()
{
	if (window.innerWidth)
	{
		return window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		return document.body.clientWidth;
	}
	
	return 0;
};

// alert(checkBrowserWidth()); 

