﻿var winwidth  = window.screen.availWidth-20;
var winheight = window.screen.availHeight-40;
var localhoriz  = window.screen.availWidth/2-180;
var localvert = window.screen.availHeight/2-145;
     
     if ( winwidth > 1400 )    winwidth = winwidth/2;
     
function launchnewsletter(htm,win_name)
{
   var launchnewsletter1 = window.open(htm,win_name,"resizable,"
             + "width=365"
             + ",height=250" 
             + ",top=" + localvert 
             + ",left=" + localhoriz )
}
function launchdemo(htm,win_name)
{
   var launchdemo1 = window.open(htm,win_name,"resizable,"
             + "width=850"
             + ",height=430" 
             + ",top=5"
             + ",left=5")
}
// this is to launch the ProjectXnet demo in its default size
function launchdemopxn(htm,win_name)
{
   var launchdemo1 = window.open(htm,win_name,"resizable,"
             + "width=800"
             + ",height=680" 
             + ",top=5"
             + ",left=5")
}
/*
The below function is used for demos launched by means of drop down menu:chandru
*/
function launchdemo_dic1(htm,win_name)
{
 var doc;
 var doc_htm;
 var launchdemo;
 doc = document.forms['dict_form'].db.value;
 
 if (doc == "*")
 {
 }
  else if (doc == "1")
  {
        document.location.href = "http://www.projectxnet.com/democenter.html";
  }
 else if (doc == "2")
 {
 	doc = "Flash/pxn_overview.swf&Desc=ProjectXnet Overview&w=780&h=600"
    doc_htm ="http://www.projectxnet.com/DocLocFlash.asp?File="+doc;
    launchdemo = window.open(doc_htm,win_name,"resizable,width=800,height=655,top=5,left=5");
 }
else
{
    doc_htm ="http://www.projectxnet.com/DocLocFlash.asp?File="+doc;
    launchdemo = window.open(doc_htm,win_name,"resizable,width=800,height=430,top=5,left=5");
 }
}
