// JavaScript Document
//var size;

function getFile() {
 var variable= "file";
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
		size = pair[1];
		return pair[1];
    } 
  } 
  //alert('Query Variable ' + variable + ' not found');
}
//
function getType() {
 var variable= "type";
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
		size = pair[1];
		return pair[1];
    } 
  } 
  //alert('Query Variable ' + variable + ' not found');
}

function getDownloadFile(){
	
	var file = getFile();
	var type = getType();
	//
    if(type == "mac"){
		
	document.write ( '<h1 class = \"downloadInstructsHead\" ><a href=\"downloads/' + file + '\">DOWNLOAD FOR MAC</a></h1>' );
	document.write ( '<p class = \"downloadInstructs\" >Choose a place to download your file.<br> ' ); 
	document.write ( 'Using Stuffit, extract and double-click the file.</p>  ' );	
					
	} else {
	
	document.write ( '<h1 class = \"downloadInstructsHead\" ><a href=\"downloads/' + file + '\">DOWNLOAD FOR PC</a></h1>' );
	document.write ( '<p class = \"downloadInstructs\" >Download the zip file to a desired location.<br> ' );
	document.write ( 'Extract and double-click the .exe file.</p> ' ); 	
		
	}
}