<!-- Begin Javascript
// Use this area to add new scripts that you need for your site

//PopUp
function openWindow(url,h,w,winname) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
popupWin = window.open(url,winname,'toolbar=1,location=1,directories=0,status=1,menubar=1,resizable=1,scrollbars=1,top='+wint+',screenY='+wint+',left='+winl+',screenX='+winl+',width='+w+',innerWidth='+w+',height='+h+',innerHeight='+h);
}

function openPopupNew(url,name,h,w) {
var wint = (screen.height - h) / 2;
var winl = (screen.width - w) / 2;
popupWin = window.open(url,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=1,top='+wint+',screenY='+wint+',left='+winl+',screenX='+winl+',width='+w+',innerWidth='+w+',height='+h+',innerHeight='+h);
}

//Style Functions
function setStyle(elm, style) {
//True DOM
document.getElementById(elm).setAttribute('style', style);
//IE DOM
document.getElementById(elm).style.cssText = style;
}

function setClass(elm, classname) {
//True DOM
document.getElementById(elm).setAttribute('class', classname);
//IE DOM
document.getElementById(elm).setAttribute('className', classname);
}

//SaveTo Functions
function doFav() {
var url=location.href;
var title=document.title;
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("msie")!=-1 && agt.indexOf("opera")==-1){
window.external.AddFavorite(url, title);
}
else if(agt.indexOf("firefox")!=-1){
window.sidebar.addPanel(title, url, "");
}
else if(agt.indexOf("opera")!=-1){
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(agt){
alert('You are using an unsupported browser for this script. \n Please consult your browsers documentation to bookmark this page.');
}}

function doDelicious() {
if (nonState() == 1) {
openPopupNew('https://secure.delicious.com/login?v=4&amp;partner=&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title),'delicious',285,700);
}else{
return false;
}}

function doDigg() {
if (nonState() == 1) {
openPopupNew('http://digg.com/submit?phase=2&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&bodytext=&topic=politics','digg',285,700);
}else{
return false;
}}

// End Javascript -->