var getTo = 0;
var curHeight = 20;
var clHeight = 20;
var exHeight = 130;
function make_popup(){
//var pop = document.createElement("div");
//pop.id = "friendPop";
var scrollY = document.documentElement.scrollTop || document.body.scrollTop || 0;
document.getElementById("friendPop").style.top = ((window.innerHeight||document.body.offsetHeight) - curHeight + scrollY) + "px";
scrollAdjust();
//pop.style.height = curHeight + "px";
//pop.innerHTML = "Send this page to your friends! \
//
Enter your friends' email adresses, separated by spaces:
\
//Enter your name:
"
//var expand = document.createElement("a");
//expand.href="javascript:expander('friendPop')";
//expand.appendChild(document.createTextNode("Send this page to your friends!"));
//pop.appendChild(expand);
//pop.appendChild(document.createElement("br"));
//pop.appendChild(document.createTextNode("Enter your friends' email adresses, separated by spaces:"));
//pop.appendChild(document.createElement("br"));
//var box = document.createElement("textarea");
//box.id = "emailbox";
//pop.appendChild(box);
//pop.appendChild(document.createElement("br"));
//var box = document.createElement("input");
//box.type="text";
//box.id="myname";
//pop.appendChild(document.createTextNode("Enter your name:"));
//pop.appendChild(box);
//pop.appendChild(document.createElement("br"));
//var submit = document.createElement("button");
//submit.type="button";
//submit.onclick = function(){ parseEmails(); };
//submit.appendChild(document.createTextNode("Send Emails"));
//pop.appendChild(submit);
//document.lastChild.appendChild(pop);
}
function expander(element){
var pop = document.getElementById(element);
if(pop){
if(pop.className.indexOf("expanded")!=-1){
pop.className = "";
curHeight = clHeight;
pop.style.height = curHeight + "px";
pop.childNodes[0].childNodes[0].nodeValue = "Send this to your friends!";
scrollAdjust();
}
else {
pop.className = "expanded";
curHeight = exHeight;
pop.style.height = curHeight + "px";
pop.childNodes[0].childNodes[0].nodeValue = "Close";
scrollAdjust();
}
}
}
function scrollAdjust(){
var pop = document.getElementById("friendPop");
var scrollY = document.documentElement.scrollTop || document.body.scrollTop || window.scrollY || 0;
getTo = (window.innerHeight||document.body.offsetHeight) - curHeight + scrollY;
window.setTimeout("scroller()", 10);
//if(pop){ pop.style.top = window.innerHeight - curHeight + window.scrollY; }
}
function scroller(){
var pop = document.getElementById("friendPop");
ptop = parseInt(pop.style.top);
if(Math.abs(ptop-getTo)>5){
pop.style.top = (ptop + ((ptop - getTo)>0?-5:5)) + "px";
window.setTimeout("scroller()", 10);
}
else{
pop.style.top = ( getTo - 5 ) + "px";
}
}
function parseEmails(){
var emailbox = document.getElementById("emailbox").value;
var myname = document.getElementById("myname").value;
if(emailbox&&myname){
var goodemails = "";
var emails = emailbox.split(" ");
for(var i=0;i= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; }
var http = getHTTPObject(); // We create the HTTP Object
function checkRadios(){
var a = $(".qwrapper");
for(var i=0;i