// bookmark this page
function addBookmark()
{
	var url = window.location;
	var title = document.title;

    if (window.sidebar) // firefox
	    window.sidebar.addPanel(title, url, "");
    else if(window.opera && window.print){ // opera
	    var elem = document.createElement('a');
	    elem.setAttribute('href',url);
	    elem.setAttribute('title',title);
	    elem.setAttribute('rel','sidebar');
	    elem.click();
    } 
    else if(document.all)// ie
	    window.external.AddFavorite(url, title);
}


// print page
function printPage()
{
	window.print();
}


// gallery
function showPic(whichpic)
{
	if(document.getElementById)
	{
		var largepic = document.getElementById('placeholder');
		largepic.src = whichpic.href;
		largepic.alt = whichpic.title;
		document.getElementById('desc1').innerHTML= largepic.alt;
		
		
		return false;
	}
	else
	{
		return true;
	}
}

//dropdowns
function go(box)
{
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination;
}

//Footer Social Tags
function SocialTags(URL) { 
	var currentURL = window.location.href;

	if(URL=="http://www.facebook.com/share.php"){
		newWindow = window.open(URL + "?u="+currentURL + "&title="+document.title);
	}
	else if(URL=="http://twitter.com/home"){
		 newWindow = window.open(URL + "?status="+currentURL + "&title="+document.title);
	}
	else if(URL=="http://www.google.com/bookmarks/mark"){
		 newWindow = window.open(URL + "?op=edit&output=popup&bkmk="+currentURL + "&title="+document.title);
	}
	else if(URL=="http://bookmarks.yahoo.com/toolbar/savebm"){
		 newWindow = window.open(URL + "?opener=tb&u="+currentURL + "&t="+document.title);
	}
	else{
		 newWindow = window.open(URL + "?url="+currentURL + "&title="+document.title);
	}
	if (window.focus) {newWindow.focus()}      
} 
        
//add to favourites
function addToFavorites() { 
	var title = window.document.title; 
	var url = window.document.location;

	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,"");
	} 
	else if(window.external ) { 
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { 
		return true; 
	}
	else { 
		alert("Sorry! Your browser doesn't support this function.");
	} 
}