function WhichPlugin() {
	window.open('WhichPlugin.htm', 'whichplugin', 'dependent,scrollbars,WIDTH=400,HEIGHT=400');
}	

//
// Opens up the Usage page in a new window
//
function SampleUsage(sSample) {
	if (sSample == null || sSample == "") {
		sSample = "Simple";
	}
	window.open('Usage.htm#' + sSample, 'Usage', 'dependent,scrollbars,WIDTH=400,HEIGHT=400,resizable=yes');
}

//
// Opens up the Notes page in a new window
//
function SampleNotes(sSample) {
	if (sSample == null || sSample == "") {
		sSample = "Simple";
	}
	window.open('Notes.htm#' + sSample, 'Notes', 'dependent,scrollbars,WIDTH=500,HEIGHT=500,resizable=yes');
}

// date - any instance of the Date object
// * hand all instances of the Date object to this function for "repairs"
function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------
// Function roundOff() --  Round off floating point numbers
//                         to set level of precision
// ----------------------------------------------------------

function roundOff(value, precision) {

     precision = parseInt(precision, 10);
     precision = (!precision ? 2 : precision);
     return Math.round(value*Math.pow(10,precision))/Math.pow(10,precision);
}

//  --------------------------------------------------------------------------- 
//  getLatString() -- Get the LL text for a given coords Latitude 
//  --------------------------------------------------------------------------- 
 
function getLatString(latView) { 
 
    northSouth = "N"; 
    if (latView < 0) { 
        northSouth = "S"; 
        latView = Math.abs(latView); 
    } 
 
    latDegree = Math.floor(latView); 
    latFraction = latView - latDegree;
    latMinute = latFraction * 60; 
    latSeconds = Math.abs((latMinute - Math.floor(latMinute)) * 60); 
    latMinute = Math.floor(latMinute); 
    latSeconds = roundOff(latSeconds, 1); 
 
    return(latDegree + ":" + latMinute + ":" + latSeconds + northSouth); 
} 

//  --------------------------------------------------------------------------- 
//  getLonString() -- Get the LL text for a given coords Latitude 
//  --------------------------------------------------------------------------- 
 
function getLonString(longView) { 

    eastWest = "E"; 
    if (longView < 0) { 
        eastWest = "W"; 
        longView = Math.abs(longView); 
    } 
 
    longDegree = Math.floor(longView); 
    longFraction = longView - longDegree; 
    longMinute = longFraction * 60; 
    longSeconds = Math.abs((longMinute - Math.floor(longMinute)) * 60); 
    longMinute = Math.floor(longMinute); 
    longSeconds = roundOff(longSeconds, 1); 
 
    return(longDegree + ":" + longMinute + ":" + longSeconds + eastWest);
}

