function  ShowFeedBack(url)
{
	openWindowCenterScreen(url,'FeedBack',460,480);	
}

function  ShowSendToFriend(url)
{  
 openWindowCenterScreen(url,"SendToFriend",560,480)
}
 

function openWindowCenterScreen(url,name,height,width,hasScroll,hasResize)
{
  var sBars='no';
  var sResise='no';
  if(hasScroll!=null)
    sBars=hasScroll
  if(hasResize!=null)
    sResise=hasResize  
  var w =width; //32;
  var h =height; //96;
  var wleft = (screen.width - w) / 2;
  var wLinks = (screen.height - h) / 2;
  var win = window.open(url,name,
                            'width=' + w + ', height=' + h + ', ' +
                            'left=' + wleft + ', Links=' + wLinks + ', ' +
                            'location=no, menubar=no, ' +
                            'status=no, toolbar=no, scrollbars=' + sBars + ', resizable=' + sResise );
  // Just in case width and height are ignored
  //win.resizeTo(w, h);
  // Just in case left and Links are ignored
 //  win.moveTo(wleft, wLinks);
  win.focus();    
}


function feedopen()
{
  
	if (document.frmfeedback.viewer_name.value.replace(/ /g,'').length==0)
	{
		alert('Enter your name');
		document.frmfeedback.viewer_name.focus();
		return false;
	}
	if (document.frmfeedback.viewer_email.value.replace(/ /g,'').length==0)
	{
		alert('Enter your email address');
		return false;		
	}
	else
	{
	    var strEmailRegExp=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
		var strEmail=document.frmfeedback.viewer_email.value;
		if(!strEmail.match(strEmailRegExp))
		{
		    alert('Enter a valid email address');
		    document.frmfeedback.viewer_email.focus();
		    return false;
		}
	}
	if (document.frmfeedback.viewer_suggestion.value.replace(/ /g,'').length==0)
	{
		alert('Enter feedback about this article');
		document.frmfeedback.viewer_suggestion.focus();
		return false;
	}
	//document.frmfeedback.target = "new window";
	document.frmfeedback.submit();
}

function SetLanguageID(id,code)
{
   if(id > 0)
     {
          //document.getElementById('<%=hdnLanguageID.ClientID %>').Value=ID;
          window.location.href='index.aspx?id='+ id + '&code=' + code;
           //window.location.reload();
     }
}
        

// This function is written for the text overflow issue in Mozilla.
if((document.all)&&(navigator.appVersion.indexOf('MSIE 7.')!=-1))
{
	//alert ("Running IE7");
	document.write(" <STYLE type='text/css'>.kreate{width:100%}</STYLE>");
}
if (document.layers) {
	//alert ("Running Netscape 4");
	document.write(" <STYLE type='text/css'>.kreative{width:100%;}</STYLE>");
}else if(document.all){
	//alert ("Running IE");
	document.write(" <STYLE type='text/css'>.kreative{width:100%;}</STYLE>");
}else if(document.getElementById){
	//alert ("Running Netscape 6");
	document.write("<STYLE type='text/css'>.kreative{width:87%;}</STYLE>");
}else{
	//alert("Older than 4.0 browser.");
	document.write(" <STYLE type='text/css'>.kreative{width:100%;}</STYLE>");
}