function doDelete(wid, come_from) 
{
    check = confirm("are you sure you want to delete this from your watchlist?")
    if (check == true) {
	window.location.href = "http://www.commenz.com/index.php?delfromwatchlist&wid="+wid+"&come_from="+come_from;
    }
}


function showSubTopics(topicid) 
{
	window.location.href = "http://www.commenz.com/index.php?showcomments&topicid="+topicid+"&parentid="+topicid+"&parent=yes";
   obj=document.getElementById(sub_topics);
   visible=(obj.style.display!="block")
   key=document.getElementById("x" + sub_topics);
   if (visible) {
     obj.style.display="block";
   } else {
      obj.style.display="none";
   }
}

function showRequestSubTopics(topicid) 
{
	window.location.href = "http://www.commenz.com/index.php?showrcomments&topicid="+topicid+"&parentid="+topicid+"&parent=yes";
   obj=document.getElementById(sub_topics);
   visible=(obj.style.display!="block")
   key=document.getElementById("x" + sub_topics);
   if (visible) {
     obj.style.display="block";
   } else {
      obj.style.display="none";
   }
}

function signIn(sign_in) 
{
   obj=document.getElementById(sign_in);
   visible=(obj.style.display!="block")
   key=document.getElementById("x" + sign_in);
   if (visible) {
     obj.style.display="block";
   } else {
      obj.style.display="none";
   }
}

function signIn2(sign) 
{
   new Effect.SlideDown(sign);
   /*
   obj=document.getElementById(sign);
   visible=(obj.style.display!="block")
   key=document.getElementById("x" + sign);
   if (visible) {
     obj.style.display="block";
   } else {
      obj.style.display="none";
   }
   */

}

function getTopStuff(selectedvalue)
{
    if (selectedvalue == "Top_commenZ_Users") {
        do_not_show2 = document.getElementById("Most_popular_Topics");
        do_not_show3 = document.getElementById("Most_popular_Tags");
        do_not_show4 = document.getElementById("Top_commenZ");
        do_not_show5 = document.getElementById("Top_URLs");
        do_not_show2.style.display="none";
        do_not_show3.style.display="none";
        do_not_show4.style.display="none";
        do_not_show5.style.display="none";
    } 
    if (selectedvalue == "Most_popular_Topics") {
	do_not_show1 = document.getElementById("Top_commenZ_Users");
        do_not_show3 = document.getElementById("Most_popular_Tags");
        do_not_show4 = document.getElementById("Top_commenZ");
        do_not_show5 = document.getElementById("Top_URLs");
        do_not_show1.style.display="none";
        do_not_show3.style.display="none";
        do_not_show4.style.display="none";
        do_not_show5.style.display="none";

    }
    if (selectedvalue == "Most_popular_Tags") {
	do_not_show1 = document.getElementById("Top_commenZ_Users");
        do_not_show2 = document.getElementById("Most_popular_Topics");
        do_not_show4 = document.getElementById("Top_commenZ");
        do_not_show5 = document.getElementById("Top_URLs");
        do_not_show1.style.display="none";
        do_not_show2.style.display="none";
        do_not_show4.style.display="none";
        do_not_show5.style.display="none";

    }
    if (selectedvalue == "Top_commenZ") {
	do_not_show1 = document.getElementById("Top_commenZ_Users");
        do_not_show2 = document.getElementById("Most_popular_Topics");
        do_not_show3 = document.getElementById("Most_popular_Tags");
        do_not_show5 = document.getElementById("Top_URLs");
        do_not_show1.style.display="none";
        do_not_show2.style.display="none";
        do_not_show3.style.display="none";
        do_not_show5.style.display="none";

    }
    if (selectedvalue == "Top_URLs") {
	do_not_show1 = document.getElementById("Top_commenZ_Users");
        do_not_show2 = document.getElementById("Most_popular_Topics");
        do_not_show3 = document.getElementById("Most_popular_Tags");
        do_not_show4 = document.getElementById("Top_commenZ");
        do_not_show1.style.display="none";
        do_not_show2.style.display="none";
        do_not_show3.style.display="none";
        do_not_show4.style.display="none";
    }
   //alert(selectedvalue);
    obj=document.getElementById(selectedvalue);
    visible=(obj.style.display!="block")
    key=document.getElementById("x" + selectedvalue);
    if (visible) {
	new Effect.SlideDown(obj);
	obj.style.display="block";
    } else {
	obj.style.display="none";
    }
}


//open new window
function openWin(Address) 
{
      myWindow = window.open(Address, "_secondwindow", "width=600,height=400,top=100,left=100,scrollbars=yes");
        myWindow.focus();
}

