function trim(inputString)
{
	if (typeof inputString != "string")
		{ return inputString; }
	var retValue = inputString;
	var ch = retValue.substring(0, 1);
	while (ch == " ")
	{
		retValue = retValue.substring(1, retValue.length);
		ch = retValue.substring(0, 1);
	}
	ch = retValue.substring(retValue.length-1, retValue.length);
	while (ch == " ")
	{
		retValue = retValue.substring(0, retValue.length-1);
		ch = retValue.substring(retValue.length-1, retValue.length);
	}
	while (retValue.indexOf(" ") != -1)
	{
		retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ")+1, retValue.length);
	}
	return retValue;
}

function waitaMinute()
{
	window.open('/Targetting/ArticleAlert.aspx?articleid=14','','toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,copyhistory=no,scrollbars=yes,width=300,height=270');
}

function newwin(sUrl)
{
	var newwindow=window.open(sUrl,'New','toolbar=yes,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=600,height=450');
	newwindow.focus();
}

function OpenNewWin(sUrl, iWidth, iHeight)
{
	if (sUrl.indexOf('?') > -1)
		sUrl += '&';
	else
		sUrl += '?';
	sUrl += 'noheader=1';
	var newwin=window.open(sUrl,'Preview','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width='+iWidth+',height='+iHeight);
	newwin.focus();
}

function ext(x,y) {
	txt1="<html><HEAD><TITLE>Doctors.net.uk - eCME</TITLE></HEAD>";
	txt2="<body bgcolor='#ffffff'>";
	txt3="<CENTER><img src='"+x+"' alt='"+y+"'>";
	txt4="<font face='arial' size=2 color='#333366'>";  
	txt5="<hr><a href='JavaScript:window.close()'>close window</a>";  
	showpic=txt1+txt2+txt3+txt4+txt5+"</font></body></html>";
	msg=open('','','toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=520,height=400');
	msg.document.write(showpic);
}

function SetFocus2(){
	if(document.forms.item = 'frmGroup'){
		if(window.event.keyCode == 13){
			hdn = document.forms['frmGroup'].elements['cntrSearch:hdnSearch'];
			hdn.value = 1;
			__doPostBack('cntrSearch:ibtnSearch','');
		};
	}
}


