
var bShowLnk = (window.location.search == '?path=' || window.location.search == '');
if(bShowLnk){

  window.onload = function(){
    
    var ePageDiv = document.getElementById('page');
  
	  var eAnch = document.createElement('a');
	  eAnch.setAttribute('href', 'http://www.facebook.com/50yearsofthepill');
	  eAnch.style.display = 'block';
	  eAnch.style.position = 'absolute';
	  eAnch.style.top = '169px';
	  eAnch.style.left = '417px';
	  eAnch.style.width = '170px';
	  eAnch.style.height = '31px';
	  ePageDiv.appendChild(eAnch);
	  
	  var eAnch2 = document.createElement('a');
	  eAnch2.setAttribute('href', 'http://www.facebook.com/50yearsofthepill');
	  eAnch2.style.display = 'block';
	  eAnch2.style.position = 'absolute';
	  eAnch2.style.top = '132px';
	  eAnch2.style.left = '305px';
	  eAnch2.style.width = '104px';
	  eAnch2.style.height = '126px';
	  ePageDiv.appendChild(eAnch2);	  
	  
  };
}

function fnOpenSurvey(){

}

function myResize()
	{
		var totalWidth;
		if (document.documentElement && document.documentElement.clientWidth)
			totalWidth = document.documentElement.clientWidth;
		else if (document.body)
			totalWidth = document.body.clientWidth;
		
		var totalHeight;
		if (self.innerHeight)
			totalHeight = self.innerHeight;
		else if (document.documentElement && document.documentElement.clientHeight)
			totalHeight = document.documentElement.clientHeight;
		else if (document.body)
			totalHeight = document.body.clientHeight;
		
		var rightFrame = document.getElementById("agreement");
		rightFrame.style.height = totalHeight + "px";
		rightFrame.style.width = totalWidth + "px";
	}


function toggle(id) {
	e = document.getElementById(id);
	if (e.style.display == 'none') {
		e.style.display = '';
	} else {
		e.style.display = 'none';
	}
}

function move(fbox, tbox) {
     var arrFbox = new Array();
     var arrTbox = new Array();
     var arrLookup = new Array();
     var i;
     for(i=0; i<tbox.options.length; i++) {
          arrLookup[tbox.options[i].text] = tbox.options[i].value;
          arrTbox[i] = tbox.options[i].text;
     }
     var fLength = 0;
     var tLength = arrTbox.length
     for(i=0; i<fbox.options.length; i++) {
          arrLookup[fbox.options[i].text] = fbox.options[i].value;
          if(fbox.options[i].selected && fbox.options[i].value != "") {
               arrTbox[tLength] = fbox.options[i].text;
               tLength++;
          } else {
               arrFbox[fLength] = fbox.options[i].text;
               fLength++;
          }
     }
     //arrFbox.sort();
     //arrTbox.sort();
     fbox.length = 0;
     tbox.length = 0;
     var c;
     for(c=0; c<arrFbox.length; c++) {
          var no = new Option();
          no.value = arrLookup[arrFbox[c]];
          no.text = arrFbox[c];
          fbox[c] = no;
     }
     for(c=0; c<arrTbox.length; c++) {
     	var no = new Option();
     	no.value = arrLookup[arrTbox[c]];
     	no.text = arrTbox[c];
     	tbox[c] = no;
     }
}
function copyOption(fbox, tbox) {
     var arrFbox = new Array();
     var arrTbox = new Array();
     var arrLookup = new Array();
     var i;
     for(i=0; i<tbox.options.length; i++) {
          arrLookup[tbox.options[i].text] = tbox.options[i].value;
          arrTbox[i] = tbox.options[i].text;
     }
     var fLength = 0;
     var tLength = arrTbox.length
     for(i=0; i<fbox.options.length; i++) {
          arrLookup[fbox.options[i].text] = fbox.options[i].value;
          if(fbox.options[i].selected && fbox.options[i].value != "") {
               arrTbox[tLength] = fbox.options[i].text;
               tLength++;
          } else {
               arrFbox[fLength] = fbox.options[i].text;
               fLength++;
          }
     }
     //arrFbox.sort();
     //arrTbox.sort();
     //fbox.length = 0;
     tbox.length = 0;
     var c;
     /*for(c=0; c<arrFbox.length; c++) {
          var no = new Option();
          no.value = arrLookup[arrFbox[c]];
          no.text = arrFbox[c];
          fbox[c] = no;
     }*/
     for(c=0; c<arrTbox.length; c++) {
     	var no = new Option();
     	no.value = arrLookup[arrTbox[c]];
     	no.text = arrTbox[c];
     	tbox[c] = no;
     }
}
function selectAll(box) {
	for(var i=0; i<box.length; i++) {
		box[i].selected = true;
	}
}
