﻿// JScript File

function openlink(src,url,dest)
{
  url = UrlEncode(url);
  window.open(src + "&targeturl=" + url,dest);
}

 
function UrlEncode(text) 
 {		
	text=ReplaceAll(text, "?", "%3F");
	text=ReplaceAll(text, "=", "%3D");
	text=ReplaceAll(text, "&", "%26");
	text=ReplaceAll(text, " ", "+");
	text=ReplaceAll(text, ",", "%2c");	
	return text;
}
       
function ReplaceAll(varb, replaceThis, replaceBy)
{	
	newvarbarray=varb.split(replaceThis);
	newvarb=newvarbarray.join(replaceBy);	
	return newvarb;
}