﻿// JScript File

function OpenPopup(url){
	width= window.screen.availWidth;
	height= window.screen.availHeight;
	features = "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + "";
	window.open(url,"",features);
}

function setBookmark(url,title){
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

function getURL(tag,title,site){

        switch(site)
        {
            case "digg":
              location.href="http://digg.com/submit?phase=2&url=" + location.href + "&title=" + title;
              break    
            case "slashdot":
              location.href="http://slashdot.org/submit.pl";
              break
            case "del":
              location.href="http://del.icio.us/post?&url=" + location.href + "&title=" + title;
              break
            case "technorati":
              location.href="http://technorati.com/faves?add=" + location.href;
              break
            case "reddit":
              location.href="http://reddit.com/submit?url=" + location.href + "&title=" + title;
              break
            case "yahoo":
              location.href="http://e.my.yahoo.com/config/edit_bookmark?.src=bookmarks&.folder=1&.name=" + title + "&.url=" + location.href +"&.save=+Save+";
              break
            case "furl":
              location.href="http://www.furl.net/storeIt.jsp?u=" + location.href + "&t=" + title;
              break
            case "newsvine":
              location.href="http://www.newsvine.com/_tools/seed&save?u=" + location.href + "&h=" + title;
              break
            case "blinklist":
              location.href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=" + location.href + "&title=" + title;
              break
            case "spurl":
              location.href="http://www.spurl.net/spurl.php?url=" + location.href + "&title=" + title;
              break
            case "shadows":
              location.href="http://www.shadows.com/features/tcr.htm?url=" + location.href + "&title=" + title;
              break
            case "simpy":
              location.href="http://www.simpy.com/simpy/LinkAdd.do?href=" + location.href + "&title=" + title;
              break
            case "google":
              location.href="http://www.google.com/bookmarks/mark?op=add&bkmk=" + location.href + "&title=" + title;
              break
              

        }



}

ddaccordion.init({
	headerclass: "submenuheader", //Shared CSS class name of headers group
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["suffix", "<img src='images/menu/plus.gif' class='statusicon' />", "<img src='images/menu/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "normal", //speed of animation: "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})
