// JavaScript Document

function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
 
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
 
    return vars[hash[0]];
}

var page;
function openBox(page) {
	if(page=='inconsisExplained'){
	GB_showCenter('Inconsistencies Explained','http://www.prioritiesnow.com/help/inconsitencies_expl.html', 400,650);
	} else if(page=='howto'){
	GB_showCenter('Be Brown for a day.','http://www.prioritiesnow.com/help/hn_howto.html', 425,650);
	}
}

var flHeight;
var flWidth;

var sliderID;
var sliderID1;
var sliderID2;

function showFlash(flHeight, sliderID){
	//var slider_id = sliderID;

	flHeight = flHeight+'px';
	document.getElementById(sliderID).style.height = flHeight;
	document.getElementById(sliderID).style.width = '255px';
	sliderID1 = sliderID+'1';
	document.getElementById(sliderID1).style.height = flHeight;
	sliderID2 = sliderID+'2';
	document.getElementById(sliderID2).style.height = flHeight;

}

function showImage(flWidth, sliderID2){

	flWidth = flWidth+'px';
	document.getElementById(sliderID2).style.width = flWidth;

}

function gotoAnchor(sliderID1){
	window.location.hash=sliderID1+'a';
	//alert(sliderID1);
}

document.write("<a name=issue"+ issue_id +"a id=issue"+ issue_id +"a><\/a>");
document.write("                      <div style=\"position:relative; width:255px;\" id=\"issue"+ issue_id +"1\">");
document.write("                        <div class=\"flashContent\" style=\"float:left; width:100%;\" >");
document.write("                          <div style=\"position:absolute; float:left; z-index:100;\" id=\"issue"+ issue_id +"2\">");
document.write("                            <object id=issue"+ issue_id +"  style=\"width:255px; display:block;\"  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=7,0,19,0\" width=\"100%\">");
document.write("                              <param name=\"movie\" value=\"http:\/\/www.prioritiesnow.com\/polling\/flash\/polling_sliders_compare.swf?sliderID=issue"+ issue_id + "&val="+ val  +"&Issue_ID="+ issue_id +"\"/>");
document.write("<param name=\"allowScriptAccess\" value=\"always\" \/>");
document.write("							  <param name=\"flashvars\" value=\"sliderID=issue"+ issue_id + "&val="+ val +"&Issue_ID="+ issue_id +"\"/>");
//document.write("                              <param name=\"flashvars\" value=\"sliderID=issue"+ issue_id + "&val="+ val +"&Issue_ID="+ issue_id +"\"/>");
document.write("                              <param name=\"quality\" value=\"high\" \/>");
document.write("                              <param name=\"wmode\" value=\"transparent\" \/>");
document.write("                              <embed src=\"http:\/\/www.prioritiesnow.com\/polling\/flash\/polling_sliders_compare.swf\" flashvars=\"sliderID=issue"+ issue_id + "&val="+ val +"&Issue_ID="+ issue_id +"\" id=issue"+ issue_id +"  wmode=\"transparent\" quality=\"high\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" type=\"application\/x-shockwave-flash\" width=\"100%\" height=\"100%\" allowScriptAccess=\"always\"><\/embed>");
document.write("                            <\/object>");
document.write("                          <\/div>");
document.write("                        <\/div>");
document.write("                      <\/div>");
