YAHOO.namespace("example.container");
var win_location=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
function enter_pressed(e){
if(window.event){
keynum=e.keyCode;
}else{
if(e.which){
keynum=e.which;
}
}
if(keynum==13){
return true;
}else{
return false;
}
}
Array.prototype.contains=function(r){
for(var x=0;x<this.length;x++){
if(this[x]==r){
this.splice(x,1);
return true;
}
}
return false;
};
Array.prototype.intersection=function(_4){
for(var x=0;x<this.length;x++){
_4.contains(this[x]);
}
};
Array.prototype.forEach=function(f){
var i=this.length,j,l=this.length;
for(i=0;i<l;i++){
if((j=this[i])){
f(j);
}
}
};
Array.prototype.insert=function(i,v){
if(i>=0){
var a=this.slice(),b=a.splice(i);
a[i]=v;
return a.concat(b);
}
};
Array.prototype.lastIndexOf=function(v,b,s){
b=+b||0;
var i=this.length;
while(i-->b){
if(this[i]===v||s&&this[i]==v){
return i;
}
}
return -1;
};
Array.prototype.indexOf=function(v,b,s){
for(var i=+b||0,l=this.length;i<l;i++){
if(this[i]===v||s&&this[i]==v){
return i;
}
}
return -1;
};
Array.prototype.random=function(r){
var i=0,l=this.length;
if(!r){
r=this.length;
}else{
if(r>0){
r=r%l;
}else{
i=r;
r=l+r%l;
}
}
return this[Math.floor(r*Math.random()-i)];
};
Array.prototype.walk=function(f){
var a=[],i=this.length;
while(i--){
a.push(f(this[i]));
}
return a.reverse();
};
Array.prototype.unique=function(b){
var a=[],i,l=this.length;
for(i=0;i<l;i++){
if(a.indexOf(this[i],0,b)<0){
a.push(this[i]);
}
}
return a;
};
function init_logout(){
var _21=readCookie("bsc_access");
if(_21>0){
var _22=readCookie("bsc_user");
var uid=readCookie("bsc_uid");
document.getElementById("login_info_static").innerHTML="<div style='float:left;font-weight:bold;'>"+_22+" &raquo; </div>"+"<div style='color:#ffffff;cursor:pointer;float:left;font-weight:bold;' id='logout_id' onclick='logout_func();'>&nbsp; logout</div>";
}
}
YAHOO.util.Event.on(this,"load",init_logout);
function init_top_menu(){
var _24={points:{to:[YAHOO.util.Dom.getX("home_menu"),YAHOO.util.Dom.getY("home_menu")]},width:{to:50}};
var _25=new YAHOO.util.Motion("slidemenu",_24,0.5,YAHOO.util.Easing.backOut);
YAHOO.util.Event.on(document.getElementById("home_menu"),"mouseover",_25.animate,_25,true);
var _26={points:{to:[YAHOO.util.Dom.getX("faqs_menu"),YAHOO.util.Dom.getY("faqs_menu")]},width:{to:50}};
var _27=new YAHOO.util.Motion("slidemenu",_26,0.5,YAHOO.util.Easing.backOut);
YAHOO.util.Event.on(document.getElementById("faqs_menu"),"mouseover",_27.animate,_27,true);
var _28={points:{to:[YAHOO.util.Dom.getX("blog_menu"),YAHOO.util.Dom.getY("blog_menu")]},width:{to:50}};
var _29=new YAHOO.util.Motion("slidemenu",_28,0.5,YAHOO.util.Easing.backOut);
YAHOO.util.Event.on(document.getElementById("blog_menu"),"mouseover",_29.animate,_29,true);
var _2a={points:{to:[YAHOO.util.Dom.getX("wiki_menu"),YAHOO.util.Dom.getY("wiki_menu")]},width:{to:50}};
var _2b=new YAHOO.util.Motion("slidemenu",_2a,0.5,YAHOO.util.Easing.backOut);
YAHOO.util.Event.on(document.getElementById("wiki_menu"),"mouseover",_2b.animate,_2b,true);
var _2c={points:{to:[YAHOO.util.Dom.getX("contact_menu"),YAHOO.util.Dom.getY("contact_menu")]},width:{to:80}};
var _2d=new YAHOO.util.Motion("slidemenu",_2c,0.5,YAHOO.util.Easing.backOut);
YAHOO.util.Event.on(document.getElementById("contact_menu"),"mouseover",_2d.animate,_2d,true);
var _2e={points:{to:[YAHOO.util.Dom.getX("lib_menu"),YAHOO.util.Dom.getY("lib_menu")]},width:{to:80}};
var _2f=new YAHOO.util.Motion("slidemenu",_2e,0.5,YAHOO.util.Easing.backOut);
YAHOO.util.Event.on(document.getElementById("lib_menu"),"mouseover",_2f.animate,_2f,true);
}
YAHOO.util.Event.on(this,"load",init_top_menu);
function closeTopOfCharts(){
var _30={width:{to:0},height:{to:0},opacity:{to:0}};
function close_view_panel(){
var _31=new YAHOO.util.Anim("container_1_1",_30,0.5,YAHOO.util.Easing.backOut);
_31.animate();
}
function show_open(){
document.getElementById("tcharts").innerHTML="<a href=\"#\" id=\"top_charts\"><img src=\"images/expand_ns.gif\" border=\"0\" title=\"open\"></a>";
document.getElementById("tcharts_txt").innerHTML="click to open...";
openTopOfCharts();
if(win_location.match("bsc_movwin.html")){
init_flash_ctrl();
}
}
var _32={height:{to:15}};
var _33=new YAHOO.util.Anim("container_1",_32,0.5,YAHOO.util.Easing.backOut);
_33.onStart.subscribe(close_view_panel);
_33.onComplete.subscribe(show_open);
YAHOO.util.Event.on(document.getElementById("top_charts"),"click",_33.animate,_33,true);
}
function openTopOfCharts(){
var _34={width:{to:954},height:{to:33},opacity:{to:1}};
function show_view_panel(){
var _35=new YAHOO.util.Anim("container_1_1",_34,0.5,YAHOO.util.Easing.backOut);
_35.animate();
}
function show_open(){
document.getElementById("tcharts").innerHTML="<a href=\"#\" id=\"top_charts\"><img src=\"images/collapse_ns.gif\" border=\"0\" title=\"close\"></a>";
document.getElementById("tcharts_txt").innerHTML="click to close...";
show_view_panel();
closeTopOfCharts();
if(win_location.match("bsc_movwin.html")){
init_flash_ctrl();
}
}
var _36={height:{to:70}};
var _37=new YAHOO.util.Anim("container_1",_36,0.5,YAHOO.util.Easing.backOut);
_37.onComplete.subscribe(show_open);
YAHOO.util.Event.on(document.getElementById("top_charts"),"click",_37.animate,_37,true);
}
YAHOO.util.Event.on(this,"load",closeTopOfCharts);
function show_author(id){
if(id<0){
document.getElementById("author").innerHTML="<center style='margin-top:30px;'><b>[</b> move mouse over team members to read about them <b>]</b></center>";
}
if(id==0){
document.getElementById("author").innerHTML="Geeta is an electrical engineer with a management background. She makes sure the job gets done! She is still the only one in the team who uses a PC - its a Y2K IBM thinkpad... enough said!";
}
if(id==1){
document.getElementById("author").innerHTML="Hari is a postdoctoral research fellow at Brandeis University. He is a biochemist and X-Ray crystallographer by day. The rest of his productive time is spent as a techno junkie - don't worry he is just a user, not a pusher... ok, maybe sometimes!";
}
if(id==2){
document.getElementById("author").innerHTML="Suresh is a hardware designer by trade - but designing graphics and webapps are his true calling! He seems to pick up a computer language a week - he still doesn't know how he used to be productive without google search!";
}
if(id==3){
document.getElementById("author").innerHTML="Shailja is a postdoctoral research fellow at Harvard Medical School working on Cancer genetics - she is also the resident icon designer and can do crazy things with adobe illustrator - Michael Angelo would have been proud!";
}
if(id==4){
document.getElementById("author").innerHTML="Deepak aka 'Atom' <b>was</b> a chemist - <b>is</b> a marketing guru and an avid blogger. His blog is mndoci.com. He also blogs at techbizmedia.com. 'blog' runs through his veins!";
}
}
function initAboutUs(){
var _39="About Us";
function show_aboutus(){
document.getElementById("aboutus_info_c").innerHTML="<b><font size='4' color='#1C8CE2'>"+_39+"</font></b><br>"+"<hr noshade style='width:580px;color:#cccccc;'></hr>"+"<div style='font-size=11px;font-family:Verdana, Arial, Helvetica, sans-serif;'>"+"<p style='text-align:justify;margin:20px 10px 0px 5px;'>We are a team of scientists and engineers who got together to create a "+"website specifically for the <b>scientific community</b> to share <b>screencasts</b> (audio/video capture of software running on your computer screen). "+"Our goal is to provide an easy-to-use platform for users to learn and "+"share how to use software in the science space. <br><br>"+"<b>Team</b><br><br>"+"<a style='cursor:pointer;' onmouseover='show_author(0);' onmouseout='show_author(-1);'>Geeta Athalye</a><br>"+"<a style='cursor:pointer;' onmouseover='show_author(1);' onmouseout='show_author(-1);'>Hari Jayaram, Ph.D</a><br>"+"<a style='cursor:pointer;' onmouseover='show_author(2);' onmouseout='show_author(-1);'>Suresh Madhu</a><br>"+"<a style='cursor:pointer;' onmouseover='show_author(3);' onmouseout='show_author(-1);'>Shailja Pathania, Ph.D</a><br>"+"<a style='cursor:pointer;' onmouseover='show_author(4);' onmouseout='show_author(-1);'>Deepak Singh, Ph.D</a>"+"</p></div>"+"<div id='author' style='position:absolute;top:140px;left:160px;width:350px;height:70px;text-align:justify;margin:0px;padding:10px;background:#f2f2f2;border:1px dotted #E39602;color:#1C8CE2;font-size:11px;'>"+"<center style='margin-top:30px;'><b>[</b> move mouse over team members to read about them <b>]</b></center></div>";
function eraseContent(){
document.getElementById("i_aboutus_bg").style.opacity="0";
document.getElementById("aboutus_info_c").innerHTML="";
}
function hideContact(){
document.getElementById("aboutus_info").style.visibility="hidden";
document.getElementById("aboutus_info").style.display="none";
if(document.getElementById("CatBox")!=null){
document.getElementById("CatBox").style.overflowY="auto";
}
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="visible";
}
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="visible";
}
}
var _3a={opacity:{to:0},height:{to:0}};
var _3b=new YAHOO.util.Motion("c_aboutus_bg",_3a,0.5,YAHOO.util.Easing.backOut);
_3b.onStart.subscribe(eraseContent);
_3b.onComplete.subscribe(hideContact);
YAHOO.util.Event.on(document.getElementById("exit_aboutus_info"),"click",_3b.animate,_3b,true);
}
function makeVisible(){
function show_block(){
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="hidden";
}
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="hidden";
}
if(document.getElementById("CatBox")!=null){
document.getElementById("CatBox").style.overflowY="hidden";
}
document.getElementById("aboutus_info").style.visibility="visible";
document.getElementById("aboutus_info").style.display="block";
}
function show_shadow(){
document.getElementById("i_aboutus_bg").style.opacity="0.7";
}
var _3c={opacity:{to:1},height:{to:302}};
var _3d=new YAHOO.util.Motion("c_aboutus_bg",_3c,0.5,YAHOO.util.Easing.backOut);
_3d.onStart.subscribe(show_block);
_3d.onComplete.subscribe(show_shadow);
_3d.animate();
}
var _3e={points:{from:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-315,230],to:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-315,230]}};
var _3f=new YAHOO.util.Motion("aboutus_info",_3e,0.5,YAHOO.util.Easing.backOut);
_3f.onStart.subscribe(makeVisible);
_3f.onComplete.subscribe(show_aboutus);
YAHOO.util.Event.on(document.getElementById("aboutus"),"click",_3f.animate,_3f,true);
}
YAHOO.util.Event.onAvailable("aboutus",initAboutUs);
function initMakesc(){
var _40="Make a screencast";
function show_makesc(){
document.getElementById("makesc_info_c").innerHTML="<center><b><font size='4' color='#1C8CE2'>"+_40+"</font></b></center>"+"<hr noshade style='width:580px;color:#cccccc;'></hr>"+"<div style='font-size=11px;font-family:Verdana, Arial, Helvetica, sans-serif;position:relative;'>"+"<p style='text-align:center;margin:0px;'>Download any of these tools below and start making your first screencast! Learn more about making screencasts with these tools at <a target='_new_' href='http://www.bioscreencastwiki.com/index.php?title=Screencast_tutorial' style='text-decoration:underline;'>bioscreencastwiki.com</a><br> "+"<div style='position:absolute;left:30px;top:50px;'><a target='_new' href='http://www.shinywhitebox.com'><img style='border:0px;' src='./images/ishowu.png'></a></div>"+"<div style='position:absolute;left:400px;top:40px;'><a target='_new' href='http://www.techsmith.com/camtasia.asp'><img style='border:0px;' src='./images/camtasia.png'></a></div>"+"<div style='position:absolute;left:150px;top:60px;'><a target='_new' href='http://www.camstudio.org/'><img style='border:0px;' src='./images/camstudio.png'></a></div>"+"<div style='position:absolute;left:220px;top:150px;'><a target='_new' href='http://www.debugmode.com/wink/'><img style='border:0px;' src='./images/wink.png'></a></div>"+"<div style='position:absolute;left:260px;top:47px;'><img style='border:0px;' src='./images/itsfree.png'></div>"+"<div style='position:absolute;left:220px;top:210px;'><img style='border:0px;' src='./images/itsfree.png'></div>"+"</p></div>";
function eraseContent(){
document.getElementById("i_makesc_bg").style.opacity="0";
document.getElementById("makesc_info_c").innerHTML="";
}
function hideContact(){
document.getElementById("makesc_info").style.visibility="hidden";
document.getElementById("makesc_info").style.display="none";
if(document.getElementById("CatBox")!=null){
document.getElementById("CatBox").style.overflowY="auto";
}
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="visible";
}
}
var _41={opacity:{to:0},height:{to:0}};
var _42=new YAHOO.util.Motion("c_makesc_bg",_41,0.5,YAHOO.util.Easing.backOut);
_42.onStart.subscribe(eraseContent);
_42.onComplete.subscribe(hideContact);
YAHOO.util.Event.on(document.getElementById("exit_makesc_info"),"click",_42.animate,_42,true);
}
function makeVisible(){
function show_block(){
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="hidden";
}
if(document.getElementById("CatBox")!=null){
document.getElementById("CatBox").style.overflowY="hidden";
}
document.getElementById("makesc_info").style.visibility="visible";
document.getElementById("makesc_info").style.display="block";
}
function show_shadow(){
document.getElementById("i_makesc_bg").style.opacity="0.7";
}
var _43={opacity:{to:1},height:{to:302}};
var _44=new YAHOO.util.Motion("c_makesc_bg",_43,0.5,YAHOO.util.Easing.backOut);
_44.onStart.subscribe(show_block);
_44.onComplete.subscribe(show_shadow);
_44.animate();
}
var _45={points:{from:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-315,230],to:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-315,230]}};
var _46=new YAHOO.util.Motion("makesc_info",_45,0.5,YAHOO.util.Easing.backOut);
_46.onStart.subscribe(makeVisible);
_46.onComplete.subscribe(show_makesc);
YAHOO.util.Event.on(document.getElementById("makesc"),"click",_46.animate,_46,true);
}
YAHOO.util.Event.onAvailable("aboutus",initMakesc);
function contact_enter_func(e){
if(enter_pressed(e)){
contact_func();
}
}
function contact_func(){
var em=document.getElementById("contact_email").value;
var fn=document.getElementById("contact_name").value;
var msg=document.getElementById("contact_msg").value;
if(em.lastIndexOf("@")==-1){
document.getElementById("contact_result").innerHTML="<font color='red'>error:</font> please enter a valid email address";
return;
}
if(fn.length<1){
document.getElementById("contact_result").innerHTML="<font color='red'>error:</font> please enter a name";
return;
}
if(msg.length<1){
document.getElementById("contact_result").innerHTML="<font color='red'>error:</font> please enter a message";
return;
}
var _4b="contact_email="+em+"&contact_name="+fn+"&contact_msg="+msg;
var cb={success:function(o){
document.getElementById("contact_result").innerHTML="<font color='green'>success:</font> "+o.responseText;
document.getElementById("contact_signup").innerHTML="<img src='images/greybutton_submit.gif'>";
},failure:function(o){
document.getElementById("contact_result").innerHTML="fail: "+o.responseText;
document.getElementById("contact_signup").innerHTML="<img src='images/greybutton_submit.gif'>";
}};
document.getElementById("contact_signup").innerHTML="<img src='images/loading_blue_small.gif'>";
var _4f=YAHOO.util.Connect.asyncRequest("POST","./php/get_contact.php",cb,_4b);
}
function showContactPanel(id){
var _51;
var _52;
_51="Contact Us";
_52="";
function show_contact(){
var _53=Math.floor(Math.random()*10000);
document.getElementById("contact_info_c").innerHTML="<b><font size='4' color='#1C8CE2'>"+_51+"</font></b><br>"+"<hr noshade style='width:580px;color:#cccccc;'></hr><br>"+"<div style='float:left;width:50px;'>Email:</div><div style='float:left;width:230px;'><input id='contact_email' name='contact_email' type='text' size='30'></div>"+"<div style='float:left;width:50px;'>Name:</div><div style='float:left;'><input id='contact_name' name='contact_name' type='text' size='30'></div><div style='clear:both;'></div><br>"+"Message:<br><textarea id='contact_msg' name='contact_msg' rows='7' cols='80'>"+_52+"</textarea><br><br>"+"<div id='contact_signup' onclick='contact_func();' style='cursor:pointer;'>"+"<img src='images/greybutton_submit.gif'></div>";
document.getElementById("contact_email").focus();
function eraseContent(){
document.getElementById("i_contact_bg").style.opacity="0";
document.getElementById("contact_info_c").innerHTML="";
document.getElementById("contact_result").innerHTML="";
}
function hideContact(){
document.getElementById("contact_info").style.visibility="hidden";
document.getElementById("contact_info").style.display="none";
if(document.getElementById("CatBox")!=null){
document.getElementById("CatBox").style.overflowY="auto";
}
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="visible";
}
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="visible";
}
}
var _54={opacity:{to:0},height:{to:0}};
var _55=new YAHOO.util.Motion("c_contact_bg",_54,0.5,YAHOO.util.Easing.backOut);
_55.onStart.subscribe(eraseContent);
_55.onComplete.subscribe(hideContact);
YAHOO.util.Event.on(document.getElementById("exit_contact_info"),"click",_55.animate,_55,true);
}
function makeVisible(){
function show_block(){
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="hidden";
}
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="hidden";
}
if(document.getElementById("CatBox")!=null){
document.getElementById("CatBox").style.overflowY="hidden";
}
document.getElementById("contact_info").style.visibility="visible";
document.getElementById("contact_info").style.display="block";
}
function show_shadow(){
document.getElementById("i_contact_bg").style.opacity="0.7";
}
var _56={opacity:{to:1},height:{to:302}};
var _57=new YAHOO.util.Motion("c_contact_bg",_56,0.5,YAHOO.util.Easing.backOut);
_57.onStart.subscribe(show_block);
_57.onComplete.subscribe(show_shadow);
_57.animate();
}
var _58={points:{from:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-315,230],to:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-315,230]}};
var _59=new YAHOO.util.Motion("contact_info",_58,0.5,YAHOO.util.Easing.backOut);
_59.onStart.subscribe(makeVisible);
_59.onComplete.subscribe(show_contact);
YAHOO.util.Event.on(document.getElementById("contact_menu"),"click",_59.animate,_59,true);
if(id==1){
_59.animate();
}
}
YAHOO.util.Event.onAvailable("contact_menu",showContactPanel);
function shakeWindow(n){
if(parent.moveBy){
for(i=10;i>0;i--){
for(j=n;j>0;j--){
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
}
}
}
}
var shake_login;
function shake_cont(){
shake_login.value--;
shake_login.start();
}
function shake(id,v){
this.id=id;
this.value=v;
this.start=function(){
if(this.value<0){
return false;
}
var _5d;
if((this.value%2)==1){
_5d=-10;
}else{
_5d=10;
}
var _5e={points:{to:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-100+_5d,140]}};
anim_md=new YAHOO.util.Motion("login_info",_5e,0.01,YAHOO.util.Easing.backOut);
anim_md.onComplete.subscribe(shake_cont);
anim_md.animate();
};
}
var l=new Object();
var login_dataset;
function send_email(){
var e=document.getElementById("email_login").value;
if(e.lastIndexOf("@")==-1){
document.getElementById("login_result").innerHTML="<font color='red'>error:</font> please enter a valid email address";
return;
}
var _60="cmd=1&email="+e;
var cb={success:function(o){
document.getElementById("login_result").innerHTML=o.responseText;
},failure:function(o){
alert("fail: "+o.responseText);
}};
var _64=YAHOO.util.Connect.asyncRequest("POST","./php/send_email.php",cb,_60);
}
function logout_func(){
eraseCookie("bsc_uid");
eraseCookie("bsc_user");
eraseCookie("bsc_access");
eraseCookie("bsc_verf");
window.location.reload();
}
function login_enter_func(e){
if(enter_pressed(e)){
login_func();
}
}
function login_func(){
var lg=document.getElementById("email_login").value;
var ps=document.getElementById("pass_login").value;
if(lg.lastIndexOf("@")==-1){
document.getElementById("login_result").innerHTML="<font color='red'>error:</font> please enter your email to login";
return;
}
if(ps.length<1){
document.getElementById("login_result").innerHTML="<font color='red'>error:</font> please enter your password";
return;
}
var _68="cmd=2&uid=-1&email_login="+lg+"&pass_login="+ps;
var cb={success:function(o){
eval("l="+o.responseText);
login_dataset=l["arr"];
if(login_dataset[0].ACCESS==-2){
shake_login=new shake("login_id",5);
shake_login.start();
document.getElementById("login_result").innerHTML="failure: sorry, no login, please signup.";
document.getElementById("submit_login").innerHTML="<img src='images/greybutton_submit.gif'>";
}else{
if(login_dataset[0].ACCESS==-1){
shake_login=new shake("login_id",5);
shake_login.start();
document.getElementById("login_result").innerHTML="failure: "+login_dataset[0].FNAME+": incorrect password!";
document.getElementById("submit_login").innerHTML="<img src='images/greybutton_submit.gif'>";
}else{
createCookie("bsc_access",login_dataset[0].ACCESS,365);
createCookie("bsc_user",login_dataset[0].FNAME+" "+login_dataset[0].LNAME,365);
createCookie("bsc_uid",login_dataset[0].ID,365);
createCookie("bsc_verf",login_dataset[0].VERF,365);
if(win_location.match("bsc_popup.html")){
closeLoginPanel();
createUrlInput();
}
if(win_location.match("bsc_movwin.html")){
closeLoginPanel();
window.location.reload();
}else{
if(win_location!="bsc_main.html"){
closeLoginPanel();
window.location="bsc_main.html";
}else{
getFavTags(login_dataset[0].ID);
showAccDetails();
closeLoginPanel();
document.getElementById("login_info_static").innerHTML="<div style='float:left;font-weight:bold;'>"+login_dataset[0].FNAME+" "+login_dataset[0].LNAME+" &raquo; </div><div style='color:#ffffff;cursor:pointer;float:left;font-weight:bold;' id='logout_id' onclick='logout_func();'>&nbsp; logout</div>";
document.getElementById("tab1").style.visibility="visible";
document.getElementById("tab2").style.visibility="visible";
document.getElementById("tab3").style.visibility="visible";
}
}
}
}
},failure:function(o){
document.getElementById("login_result").innerHTML="fail: "+o.responseText;
document.getElementById("submit_login").innerHTML="<img src='images/greybutton_submit.gif'>";
}};
document.getElementById("submit_login").innerHTML="<img src='images/loading_blue_small.gif'>";
var _6c=YAHOO.util.Connect.asyncRequest("POST","./php/get_login.php",cb,_68);
}
function closeLoginPanel(){
function eraseContent(){
document.getElementById("i_login_bg").style.opacity="0";
document.getElementById("login_info_c").innerHTML="";
document.getElementById("login_result").innerHTML="";
}
function hideLoginPanel(){
document.getElementById("login_info").style.visibility="hidden";
document.getElementById("login_info").style.display="none";
}
var _6d={opacity:{to:0},height:{to:0}};
var _6e=new YAHOO.util.Motion("c_login_bg",_6d,0.5,YAHOO.util.Easing.backOut);
_6e.onStart.subscribe(eraseContent);
_6e.onComplete.subscribe(hideLoginPanel);
_6e.animate();
}
function showLoginPanel(){
function show_login(){
document.getElementById("login_info_c").innerHTML="<b><font size='4' color='#1C8CE2'>Login</font></b><br>"+"<hr noshade style='width:180px;color:#cccccc;'></hr>"+"Email:<br><input id='email_login' name='email_login' type='text' size='25'><br>"+"Password:<br><input id='pass_login' name='pass_login' type='password' size='25' onkeypress='login_enter_func(event);'><br>"+"<a id='forgot_pass' title='<center>enter your email address, <br>and press the <b>email password</b> link above</center>' style='font-size:10px;'>forgot password?</a> :: <a onclick='send_email();' style='font-size:10px;cursor:pointer;'>email password</a><br><br>"+"<div id='submit_login' onclick='login_func();' style='cursor:pointer;text-align:center;'>"+"<img src='images/greybutton_submit.gif'></div><br>"+"<div style='font-size:11px;'>Don't have a login? then <a id='signup' style='text-decoration:underline;cursor:pointer;'>signup here</a></div>";
document.getElementById("email_login").focus();
showSignupPanel();
YAHOO.example.container.tt2=new YAHOO.widget.Tooltip("tt2",{context:"forgot_pass",zIndex:30000});
function eraseContent(){
document.getElementById("i_login_bg").style.opacity="0";
document.getElementById("login_info_c").innerHTML="";
document.getElementById("login_result").innerHTML="";
}
function hideLoginPanel(){
document.getElementById("login_info").style.visibility="hidden";
document.getElementById("login_info").style.display="none";
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="visible";
}
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="visible";
}
}
var _6f={opacity:{to:0},height:{to:0}};
var _70=new YAHOO.util.Motion("c_login_bg",_6f,0.5,YAHOO.util.Easing.backOut);
_70.onStart.subscribe(eraseContent);
_70.onComplete.subscribe(hideLoginPanel);
YAHOO.util.Event.on(document.getElementById("exit_login_info"),"click",_70.animate,_70,true);
}
function makeVisible(){
function show_block(){
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="hidden";
}
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="hidden";
}
document.getElementById("login_info").style.visibility="visible";
document.getElementById("login_info").style.display="block";
}
function show_shadow(){
document.getElementById("i_login_bg").style.opacity="0.7";
}
var _71={opacity:{to:1},height:{to:216}};
var _72=new YAHOO.util.Motion("c_login_bg",_71,0.5,YAHOO.util.Easing.backOut);
_72.onStart.subscribe(show_block);
_72.onComplete.subscribe(show_shadow);
_72.animate();
}
var _73;
var _74={points:{from:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-100,230],to:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-100,230]}};
_73=new YAHOO.util.Motion("login_info",_74,0.5,YAHOO.util.Easing.backOut);
_73.onStart.subscribe(makeVisible);
_73.onComplete.subscribe(show_login);
YAHOO.util.Event.on(document.getElementById("login"),"click",_73.animate,_73,true);
}
YAHOO.util.Event.onAvailable("login",showLoginPanel);
function signup_enter_func(e){
if(enter_pressed(e)){
signup_func();
}
}
function signup_func(rn){
var em=document.getElementById("signup_email").value;
var fn=document.getElementById("signup_fname").value;
var ln=document.getElementById("signup_lname").value;
var pr=document.getElementById("signup_prof").value;
var pa=document.getElementById("signup_pass").value;
var re=document.getElementById("signup_repass").value;
var ve=document.getElementById("signup_verf").value;
var rt=document.getElementById("rd_tos").checked;
if(em.lastIndexOf("@")==-1){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> please enter a valid email address";
return;
}
if(fn.length<1){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> please enter a valid firstname";
return;
}
if(ln.length<1){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> please enter a valid lastname";
return;
}
if(pr.length<1){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> please enter a valid profession";
return;
}
if(pa.length<1){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> please enter a valid password";
return;
}
if(pa!=re){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> passwords should match";
return;
}
if(ve!=rn){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> verification code does not match";
return;
}
if(rt==false){
document.getElementById("signup_result").innerHTML="<font color='red'>error:</font> please read & check the terms of use checkbox";
return;
}
var _7f=BrowserDetect.browser+" / version: "+BrowserDetect.version+" / on: "+BrowserDetect.OS;
var _80="signup_email="+em+"&signup_fname="+fn+"&signup_lname="+ln+"&signup_prof="+pr+"&signup_pass="+pa+"&signup_verf="+ve+"&binfo="+_7f;
var cb={success:function(o){
document.getElementById("signup_result").innerHTML="<font color='green'>success:</font>  "+o.responseText;
document.getElementById("submit_signup").innerHTML="<img src='images/greybutton_submit.gif'>";
},failure:function(o){
document.getElementById("signup_result").innerHTML="fail: "+o.responseText;
document.getElementById("submit_signup").innerHTML="<img src='images/greybutton_submit.gif'>";
}};
document.getElementById("submit_signup").innerHTML="<img src='images/loading_blue_small.gif'>";
var _84=YAHOO.util.Connect.asyncRequest("POST","./php/get_signup.php",cb,_80);
}
function showSignupPanel(){
function show_signup(){
var _85=Math.floor(Math.random()*1000000);
document.getElementById("signup_info_c").innerHTML="<b><font size='4' color='#1C8CE2'>Signup</font></b><br>"+"<hr noshade style='width:280px;color:#cccccc;'></hr>"+"Email:<br><input id='signup_email' name='signup_email' type='text' size='30'><br>"+"First Name:<br><input id='signup_fname' name='signup_name' type='text' size='30'><br>"+"Last Name:<br><input id='signup_lname' name='signup_name' type='text' size='30'><br>"+"Profession:<br><input id='signup_prof' name='signup_prof' type='text' size='30'><br>"+"Password:<br><input id='signup_pass' name='signup_pass' type='password' size='30'><br>"+"Re-type Password:<br><input id='signup_repass' name='signup_repass' type='password' size='30'><br>"+"Type Verification Code: "+_85+"<br>"+"<input id='signup_verf' name='signup_verf' type='text' size='30' onkeypress='signup_enter_func(event);'><br>"+"<div style='position:relative;margin-top:4px;margin-left:90px;'>"+"<div style='float:left;'><input id='rd_tos' type='checkbox' style='border:0px;'></div><div style='float:left;margin-top:2px;margin-left:5px;'>I accept the <a style='text-decoration:underline;' href='bsc_tos.html' target='_new'>terms of use</a></div><div style='clear:both;'></div></div>";
if(BrowserDetect.browser!="Explorer"){
document.getElementById("signup_info_c").innerHTML+="<br>";
}
document.getElementById("signup_info_c").innerHTML+="<div id='submit_signup' onclick='signup_func("+_85+");' style='cursor:pointer;z-index:20000;'>"+"<img src='images/greybutton_submit.gif'></div>";
document.getElementById("signup_email").focus();
function eraseContent(){
document.getElementById("i_signup_bg").style.opacity="0";
document.getElementById("signup_info_c").innerHTML="";
document.getElementById("signup_result").innerHTML="";
}
function hideSignup(){
document.getElementById("signup_info").style.visibility="hidden";
document.getElementById("signup_info").style.display="none";
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="visible";
}
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="visible";
}
}
var _86={opacity:{to:0},height:{to:0}};
var _87=new YAHOO.util.Motion("c_signup_bg",_86,0.5,YAHOO.util.Easing.backOut);
_87.onStart.subscribe(eraseContent);
_87.onComplete.subscribe(hideSignup);
YAHOO.util.Event.on(document.getElementById("exit_signup_info"),"click",_87.animate,_87,true);
}
function makeVisible(){
function show_block(){
closeLoginPanel();
if(document.getElementById("flashcontent")!=null){
document.getElementById("flashcontent").style.visibility="hidden";
}
if(document.getElementById("nav_info")!=null){
document.getElementById("nav_info").style.visibility="hidden";
}
document.getElementById("signup_info").style.visibility="visible";
document.getElementById("signup_info").style.display="block";
}
function show_shadow(){
document.getElementById("i_signup_bg").style.opacity="0.7";
}
var _88={opacity:{to:1},height:{to:347}};
var _89=new YAHOO.util.Motion("c_signup_bg",_88,0.5,YAHOO.util.Easing.backOut);
_89.onStart.subscribe(show_block);
_89.onComplete.subscribe(show_shadow);
_89.animate();
}
var _8a={points:{from:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-150,230],to:[parseInt(YAHOO.util.Dom.getDocumentWidth()/2)-150,230]}};
var _8b=new YAHOO.util.Motion("signup_info",_8a,0.5,YAHOO.util.Easing.backOut);
_8b.onStart.subscribe(makeVisible);
_8b.onComplete.subscribe(show_signup);
YAHOO.util.Event.on(document.getElementById("signup"),"click",_8b.animate,_8b,true);
}
YAHOO.example.top_charts=function(){
var $D=YAHOO.util.Dom;
var $E=YAHOO.util.Event;
var $A=YAHOO.util.Anim;
var $M=YAHOO.util.Motion;
var $DD=YAHOO.util.DD;
var $=$D.get;
var x=1;
return {init:function(){
$E.on(["move-left","move-right"],"click",this.move);
},move:function(e){
$E.stopEvent(e);
switch(this.id){
case "move-left":
if(x===1){
return;
}
var _94={points:{by:[700,0]}};
x--;
break;
case "move-right":
if(x===3){
return;
}
var _94={points:{by:[-700,0]}};
x++;
break;
}
var _95=new $M("tcharts_themes",_94,0.5,YAHOO.util.Easing.easeOut);
_95.animate();
}};
}();

