DaysofWeek = new Array()
DaysofWeek[0]="Sunday"
DaysofWeek[1]="Monday"
DaysofWeek[2]="Tuesday"
DaysofWeek[3]="Wednesday"
DaysofWeek[4]="Thursday"
DaysofWeek[5]="Friday"
DaysofWeek[6]="Saturday"


var danny=new Date()
var m=danny.getMinutes()
var h=danny.getHours()
var da=danny.getDate()
var mo=danny.getMonth()
var year=danny.getYear()
var keeper=DaysofWeek[danny.getDay()]

var mon=mo+1
if (da == 1 || da == 21 || da == 31)
{ender = "st"}

else
if (da == 2 || da == 22)
{ender = "nd"}

else
if (da == 3 || da == 23)
{ender = "rd"}

else
{ender = "th"}



if(mon==1)
{
var mont="January"
}
if(mon==2)
{
var mont="February"
}
if(mon==3)
{
var mont="March"
}
if(mon==4)
{
var mont="April"
}
if(mon==5)
{
var mont="May"
}
if(mon==6)
{
var mont="June"
}
if(mon==7)
{
var mont="July"
}
if(mon==8)
{
var mont="August"
}
if(mon==9)
{
var mont="September"
}
if(mon==10)
{
var mont="October"
}
if(mon==11)
{
var mont="November"
}
if(mon==12)
{
var mont="December"
}

if(year<1800)
{
var year=year+1900
}
var am="AM"
if(h>=12)
{
var am="PM"
}
var year=" "+year
var year1=year

if(h==0)
{
var h=h+12
}
if(h>12)
{
var h=h-12
}
if(m<10)
{
var m="0" + m
}
var blah=mont + " " + da +", " +  year;
var blah1=year;
function timmy()

{

DaysofWeeks = new Array()
DaysofWeeks[0]="Sunday"
DaysofWeeks[1]="Monday"
DaysofWeeks[2]="Tuesday"
DaysofWeeks[3]="Wednesday"
DaysofWeeks[4]="Thursday"
DaysofWeeks[5]="Friday"
DaysofWeeks[6]="Saturday"


var dannys=new Date()
var ms=dannys.getMinutes()
var hs=dannys.getHours()
var das=dannys.getDate()
var mos=dannys.getMonth()
var years=dannys.getYear()
var keepers=DaysofWeeks[dannys.getDay()]

var mons=mos+1
if (das == 1 || das == 21 || das == 31)
{enders = "st"}

else
if (das == 2 || das == 22)
{enders = "nd"}

else
if (das == 3 || das == 23)
{enders = "rd"}

else
{enders = "th"}



if(mons==1)
{
var monts="January"
}
if(mons==2)
{
var monts="February"
}
if(mons==3)
{
var monts="March"
}
if(mons==4)
{
var monts="April"
}
if(mons==5)
{
var monts="May"
}
if(mons==6)
{
var monts="June"
}
if(mons==7)
{
var monts="July"
}
if(mons==8)
{
var monts="August"
}
if(mons==9)
{
var monts="September"
}
if(mons==10)
{
var monts="October"
}
if(mons==11)
{
var monts="November"
}
if(mons==12)
{
var monts="December"
}

if(years<1800)
{
var years=years+1900
}
var ams="AM"
if(hs>=12)
{
var ams="PM"
}
var years=" "+years

if(hs==0)
{
var hs=hs+12
}
if(hs>12)
{
var hs=hs-12
}
if(ms<10)
{
var ms="0" + ms
}
var blahs=monts + das + years;


alert(blahs)

}


function fswitch(main,subhead) {
var main;
var subhead;

top.subheader.location = subhead;
top.main.location = main;
}

function nextwin() {
//win2=window.open("https://commerce39.datapipe.com/militel/signupmc.htm","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=325");
win2=window.open("secure/signupmc.htm","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=325");
}

function nextwin1() {
//win2=window.open("https://commerce39.datapipe.com/militel/signupbnk.htm","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=325");
win2=window.open("secure/signupbnk.htm","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=325");
}

function nextwin2() {
win2=window.open("wp.htm","calPopup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=210,height=128");
}


//////////////////////////////////////////////////////////////////////////////
//Open "Request Account Change" window (7-17-2001)
//////////////////////////////////////////////////////////////////////////////
function nextwin3() {
//win2=window.open("https://commerce39.datapipe.com/militel/changerequest.asp","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=425");
win2=window.open("https://www.militel.net/secure/chng_rqust.asp?s=0","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=425");
}

function nextwin4() {
//win2=window.open("https://commerce39.datapipe.com/militel/chng_rqust.asp?s=0&ag=4401","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=425");
win2=window.open("https://www.militel.net/secure/changerequest.asp?s=0&ag=4401","NewWindow","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=490,height=425");
}

function nextwin5() {
win2=window.open("10000.htm","SweepStakes","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=516,height=396");
}

function launchWindow(URL,winName,whatWi,whatHe, ReSize, sBars, tBars, mBars, myLoc, status) {
  var URL;
  var winName;
  openvalues = 'width=' + whatWi + ',' + 'height=' + whatHe + ',resizable=' + ReSize + ',scrollbars=' + sBars + ',toolbars=' + tBars + ',menubars=' + mBars +',location='+ myLoc +',status='+ status;
  window.open(URL,winName, openvalues);
}

function search(URL){
	opener.location.href = URL
}

//Global: build an array of frameset titles
//changes the parent frameset <title> tag
//syntax is <onLoad="changeTitle('mykey')">
function changeTitle(mykey) {
//declare variables
  var mykey;
  var myTitle = new Array()
  myTitle["g"] = "MiliTel\'s Low Cost, Direct Dial & Cellular Services From Germany";
  myTitle["gcd"] = "MiliTel\'s Low Cost, Cellular Direct Dial Services From Germany";
  myTitle["gcellb"] = "MiliTel\'s Low Cost, Cellular CellBack Dial Services From Germany";
  myTitle["gy"] = "MiliTel\'s Low Cost, 01028 Direct Dial Service From Germany";
  myTitle["gycb"] = "MiliTel\'s Low Cost, Callback Service From Germany";
  myTitle["iccb"] = "Italy 10090 - MiliTel\'s Low Cost, CellBack Service From Italy";
  myTitle["icd"] = "Italy 10090 - MiliTel\'s Low Cost, CellDirect Service From Italy";
  myTitle["icb"] = "Italy 10090 - MiliTel\'s Low Cost, CallBack Service From Italy";
  myTitle["iy"] = "Italy 10090 - MiliTel\'s Low Cost, Direct Dial Service From Italy";
  myTitle["i"] = "Italy 10090 - MiliTel\'s Low Cost Service Choices From Italy";
  myTitle["jn"] = "Japan Callback - MiliTel\'s Low Cost, Callback Service From Japan";
  myTitle["jok"] = "Okinawa Callback - MiliTel\'s Low Cost, Callback Service From Okinawa";
  myTitle["jcdok"] = "Okinawa CellBack - MiliTel\'s Low Cost, CellBack Service From Okinawa";
  myTitle["j"] = "MiliTel\'s Low Cost, Direct Dial & Cellular Services From Japan";
  myTitle["inter"] = "International Callback - MiliTel\'s Low Cost, International Callback Service";
  myTitle["fnf"] = "International Calling For Friends and Family in the US!";
  myTitle["cftusa"] = "MiliTel\'s Affordable US or Overseas Calling Services!";
  myTitle["us800"] = "MiliTel\'s US800 Service The From USA";
  myTitle["usac"] = "MiliTel\'s US AutoCall Service The From USA";
  myTitle["ch"] = "MiliTel\'s US Callhome Service The From USA";
  myTitle["oc"] = "MiliTel\'s Affordable OneCard Travel Card";
  myTitle["pp"] = "MiliTel\'s Payment Policy";
  myTitle["su"] = "Secure Online Sign Up that\'s Fast and Affordable";
  myTitle["cs"] = "Contact MiliTel! - 24 Hour, 7 day Customer Service";
  myTitle["am"] = "About MiliTel Corporation! - Successfully Serving the US military since 1993";
  myTitle["uk"] = "UK Callback - MiliTel\'s Low Cost, Callback Service From The United Kingdom";
  myTitle["ccb"] = "MiliTel\'s Affordable Cellular Callback Service";
  myTitle["cbs"] = "MiliTel\'s Cellular Services for Germany, Italy, Japan, Middle East & the World";

  top.document.title = myTitle[mykey];
}

//Checks to see if subheader frame (frame named "subheader") is loaded as a child of it's parent.
//if it is not it will redirect to what ever file is listed in place of "secName"
// sytax us frameKeeper('framesetName.htm')

function frameKeeper(secName) {
  
  var my_frame = 0 + (parent.subheader ? 1 : 0); // set to false and test for correct parent
                                                 // "is SUBHEADER frame loaded?" 
  var secName; //complete framesets names
                   
  // if not in frames or not correct parent
  // load page in proper frameset using search property
  if  (!my_frame) {                                                 
  window.location.href = secName;
  }
}   

/////////////////
//select an item from the rate dropdown list
////////////////
function hiLiteSelection(myitem) {
  var counter = myitem;
  document.myform.country2.selectedIndex = counter;
  }

function hiLiteIntl(myFrom,myFromCountry,myTo,myToCountry) {
  var counterFrom = myFrom;
  document.myform[myFromCountry].selectedIndex = counterFrom;
  
  var counterTo = myTo;
  document.myform[myToCountry].selectedIndex = counterTo;
  }
//	var faa = parseFloat(document.myform1.country1a.options[i1a].value);
//	var fba = parseFloat(document.myform1.country2a.options[i2a].value);



//////////////
//redirect  parent window and close child window
////////////
function myPopups(URL, shutWindow) {
  opener.location.href = URL;
  setTimeout("window.close();",shutWindow);
  }


/////////
//preload page, display only if done preloading
function showpage() 
{
 document.getElementById('loader').style.display = "none"; 
 document.getElementById('main').style.display = "block"; 
}