function getURL() {
        var str = window.document.URL.toString();
        var x = str.split('&');
        var newTitle= encodeURIComponent(document.title.toString());
        u = oldSystemPath+"/cgi-bin/stories.pl?ACCT=109" + "&" + x[1] + "&";
	   	if (x[2])
		  {
			  u += x[2];
		  }
    	u1 = encodeURIComponent(u) + ";partner=prnews" + "&jump=doclose";
		
	    news1 = "http://del.icio.us/post?url="+u1+"&amp;title="+ newTitle;
	    window.open(news1,"Delicious","location=yes, directories=no, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, width=700, height=500");
	    return true;      
}
//  added for PRN.Com _1.3- for post to diggit 
function getdiggURL() {
        var str = window.document.URL.toString();
        var x = str.split('&');
        
        var newTitle = encodeURIComponent(document.title.toString());
        u =oldSystemPath +"/cgi-bin/stories.pl?ACCT=109" + "&" + x[1] + "&";
	   	if (x[2])
		  {
			  u += x[2];
		  }
    	u1 = encodeURIComponent(u);
        
	    news1 = "http://digg.com/submit?phase=2&url="+u1+"&title="+ newTitle;
	    window.open(news1,"_blank");
        return true;      
}
// change for PRN.Com _1.3- ends 
//  added for PRN.Com _1.4- for Technorati implementation
function gettechURL() {
        var str = window.document.URL.toString();
        var x = str.split('&');
        var newTitle = encodeURIComponent(document.title.toString());
        news1 = "http://technorati.com/search/"+'"'+newTitle+'"';
	    window.open(news1,"_blank");
        return true;      
}
// change for PRN.Com _1.4- ends 
function getblogURL() {
        var str = window.document.URL.toString();
        var x = str.split('&');
        var newTitle = encodeURIComponent(document.title.toString());
		var words = newTitle.split('%20');
		var s = words.join("+"); 
		news1 = "http://blogsearch.google.com/blogsearch?hl=en&q="+s+"&btnG=Search+Blogs";
	    window.open(news1,"_blank");
        return true;      
}
function blogger()
{
if (legalconfirm() == false) {
	javascript:popw='';
	Q='';
	x=document;
	y=window;
	if(x.selection) 
		{Q=x.selection.createRange().text;} 
	else if (y.getSelection) 
		{Q=y.getSelection();} 
	else if (x.getSelection) 
		{Q=x.getSelection();}
	var url = location.href;
    var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0)
	{
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=105") > 0)
	{
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=106") > 0)
	{
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}
	else if (a[0].indexOf("ind_focus.story") > 0)
	{
		var b = a[0].replace(/ind_focus.story/g, "109");
	}
	else {
		var b = a[0];
	}
	
	//addedd by RK for displaying link should be in old system format
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	

	if (a[2])
		  {
			  new_url += a[2];
		  }
		
	popw = y.open('http://www.blogger.com/blog_this.pyra?t=' + escape(Q) + '&u=' + escape(new_url) + '&n=' + escape(document.title),'bloggerForm','scrollbars=no,width=475,height=300,top=175,left=75,status=yes,resizable=yes');
	if (!document.all) T = setTimeout('popw.focus()',50);
	void(0);
	return true;
	}
}

function wordpress()
{

if (legalconfirm() == false) {
	void (btw=window.open ('http://wordpress.com/wp-admin/','bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes,resizable=yes'));btw.focus();
    return true;
    }
}

function newswine()
{
	var url = location.href;
    var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0)
	{
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=105") > 0)
	{
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=106") > 0)
	{
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}
	else if (a[0].indexOf("ind_focus.story") > 0)
	{
		var b = a[0].replace(/ind_focus.story/g, "109");
	}
	else {
		var b = a[0];
	}
	
//addedd by RK for displaying link should be in old system format
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	
	if (a[2])
		  {
			  new_url += a[2];
		  }

 var news = 'http://www.newsvine.com/_wine/save?popoff=1&h=' + escape(document.title) + '&u='+ escape(new_url);
 window.open(news,'newsvine','toolbar=no,width=590,height=600,resizable=yes,scrollbars=yes');
 return true;
}   
  /*
   Newly added javascript functions */
   
   
   
   function google()
 {
 var url = location.href;
 temp = url.split('&');
 var new_url =oldSystemPath+"/cgi-bin/stories.pl?ACCT=104&" + temp[1] + "&" +temp[2];

 
var a=window,b=document,c=encodeURIComponent,d=a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(new_url)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300);

}

function GetThis(T, C, U, L) { 
	var targetUrl = 'http://www.myspace.com/Modules/PostTo/Pages/?' + 't=' + encodeURIComponent(T)+ '&c=' + encodeURIComponent(C) + '&u=' + encodeURIComponent(U) + '&l=' + L; window.open(targetUrl); 
}


function myyahoo() {
	var url = location.href;
        var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0){
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=105") > 0){
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=106") > 0){
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}else if (a[0].indexOf("ind_focus.story") > 0){
		var b = a[0].replace(/ind_focus.story/g, "109");
	}else {
		var b = a[0];
	}
	
	
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	
	
	if (a[2]) {
		new_url += a[2];
	}
	t = document.title;
	window.open('http://beta.bookmarks.yahoo.com/toolbar/savebm?u='+encodeURIComponent(new_url)+'&t='+encodeURIComponent(document.title),'sharer','resizable=yes,width=626,height=436,scrollbars=yes');
	return true;


}

function facebook() {
	var url = location.href;
      var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0){
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=105") > 0){
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=106") > 0){
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}else if (a[0].indexOf("ind_focus.story") > 0){
		var b = a[0].replace(/ind_focus.story/g, "109");
	}else {
		var b = a[0];
	}
	
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	
	if (a[2]) {
		new_url += a[2];
	}
	t = document.title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(new_url)+'&t='+encodeURIComponent(document.title),'sharer','scrollbars=yes, resizable=yes,toolbar=0,status=0,width=626,height=436');
	return true;

}

function twitter() {
	if (legalconfirm() == false) {

	var url = location.href;
        var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0){
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=105") > 0){
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=106") > 0){
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}else if (a[0].indexOf("ind_focus.story") > 0){
		var b = a[0].replace(/ind_focus.story/g, "109");
	}else {
		var b = a[0];
	}
	
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	
	
	if (a[2]) {
		new_url += a[2];
	}
	t = document.title;
	window.open("http://twitthis.com/twit?url="+encodeURIComponent(new_url)+"&title="+((t) ? encodeURIComponent(document.title.replace(/^\s*|\s*$/g,'')) : ""), "Twitter", "width=600, height=500, location, status, scrollbars, resizable");
	}
}

function myspace() {


	var url = location.href;
      var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0){
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=105") > 0){
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}else if (a[0].indexOf("ACCT=106") > 0){
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}else if (a[0].indexOf("ind_focus.story") > 0){
		var b = a[0].replace(/ind_focus.story/g, "109");
	}else {
		var b = a[0];
	}
	
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	
	
	if (a[2]) {
			  new_url += a[2];
		  }
	GetThis(document.title, document.title,url, 2)
	return true;

}
  
 /****************************************************** */
  
  
  
function reddit()
{
	var url = location.href;
    var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0)
	{
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=105") > 0)
	{
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=106") > 0)
	{
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}
	else if (a[0].indexOf("ind_focus.story") > 0)
	{
		var b = a[0].replace(/ind_focus.story/g, "109");
	}
	else {
		var b = a[0];
	}
	
	//addedd by RK for displaying link should be in old system format
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	if (a[2])
		  {
			  new_url += a[2];
		  }
	var newslink = 'http://reddit.com/submit?url=' + escape(new_url) + '&title=' + escape(document.title);
	window.open(newslink,'reddit','toolbar=no,width=590,height=600,resizable=yes,scrollbars=yes');
	return true;
}

function stumbleupon()
{
	var url = location.href;
    var a = url.split('&');
	if (a[0].indexOf("ACCT=104") > 0)
	{
		var b = a[0].replace(/ACCT=104/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=105") > 0)
	{
		var b = a[0].replace(/ACCT=105/g, "ACCT=109");
	}
	else if (a[0].indexOf("ACCT=106") > 0)
	{
		var b = a[0].replace(/ACCT=106/g, "ACCT=109");
	}
	else if (a[0].indexOf("ind_focus.story") > 0)
	{
		var b = a[0].replace(/ind_focus.story/g, "109");
	}
	else {
		var b = a[0];
	}
	
	//addedd by RK for displaying link should be in old system format
	var temp = b.split('?');
	var new_url =oldSystemPath+"/cgi-bin/stories.pl?"+ temp[1] +"&" + a[1] + "&";
	
	if (a[2])
		  {
			  new_url += a[2];
		  }
	var news1 = 'http://www.stumbleupon.com/submit?url=' + escape(new_url) + '&title=' + escape(document.title);
	window.open(news1,'stumbleupon','toolbar=no,width=590,height=600,resizable=yes,scrollbars=yes');
	return true;
}

var isFeedVisible = false;
var str1 = window.document.URL.toString();

function link(feedId)
{   	
    var myArray = new Array();
    var mySplitResult = str1.split("?");
    
    document.getElementById('link').value = oldSystemPath + "/cgi-bin/stories.pl?"+mySplitResult[1];
	
	 divFeed = document.getElementById(feedId);	
	
		if(divFeed) 
		{
			if(divFeed.style.display == 'none') 
			{
				divFeed.style.display = 'inline'					
				isFeedVisible = true;
				document.getElementById('top').href = "#linktopagebottom";	
			}
			else
			{
				divFeed.style.display = 'none'
				
				isFeedVisible = false;
				document.getElementById('top').href = "#linktopagetop";
			   
			}
		
		}
window.setTimeout('setfocusof()',40);
		return true;
	
}
function setfocusof()
{
	document.getElementById('link').select();
}


function legalconfirm() {
	var answer = confirm("The blogging site you are about to enter has no connection to PR Newswire or the issuer of this release. Links to third party sites are for your convenience only and do not imply any endorsement, guarantee, warranty or representation by PR Newswire or the issuer of this release.")
	if (answer){
		return false;
	} else {
		return true;
	}
}