
var dialog1= null;
function openSignin(fromurl){
	try {
		dialog1 = new goog.ui.Dialog('modal-dialog', true);
		dialog1.setContent('<iframe frameborder="0" src="/signin'+(fromurl ? '?ui=dialog&fromurl='+encodeURIComponent(fromurl) : '?ui=dialog')+'" style="border:0 none;width:100%;height:100%;"></iframe>');
		dialog1.setTitle(' ');
		dialog1.setButtonSet(null);
		dialog1.setModal(true);
		dialog1.setDraggable(false);
		goog.events.listen(dialog1, goog.ui.Dialog.EventType.SELECT, function(e) {
		  //alert('You chose: ' + e.key);
		});
		dialog1.setVisible(true);
    }
    catch(e){
		alert(e);
    }
    return false;
}

function fbs_click() {
u=location.href;
t=document.title;
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}

function canonical_url() {

    try {

        var links = document.getElementsByTagName('link');
        for( var i=0; i < links.length; i++ ) {
            if ( links[i].getAttribute('rel') == 'canonical' ) {
                return links[i].getAttribute('href');
            }
        }
    } catch(e) {}

    return null;
}



