function Popupart(id,Pageaction)
{
	URL = 'description.php?article_id='+id;

	windowName = '';
	width = '550';
	height = '500';
	left = '0';
	//top = '0';
	resizable = false;
	menubar = false;
	scrollbars = true;
	toolbar = false;
	directories = false;
	
	var windowFeatures;
	windowFeatures = '';
	if (width != '')
		windowFeatures = windowFeatures+'width='+width+',';
	if (height != '')
		windowFeatures = windowFeatures+'height='+height+',';
	if (left != '')
		windowFeatures = windowFeatures+'left='+left+',';
	if (top != '')
		windowFeatures = windowFeatures+'top='+top+',';
	if (resizable)
		windowFeatures = windowFeatures+'resizable,';
	if (menubar)
		windowFeatures = windowFeatures+'menubar,';
	if (scrollbars)
		windowFeatures = windowFeatures+'scrollbars,';
	if (toolbar)
		windowFeatures = windowFeatures+'toolbar,';
	if (directories)
		windowFeatures = windowFeatures+'directories,';
	
	window.open(URL, windowName, windowFeatures);
}
/* Function for introducing a pop up when using Promotional Emails*/
/*function Popupsend(id)
{
	URL = id;

	windowName = '';
	width = '550';
	height = '500';
	left = '0';
	//top = '0';
	resizable = false;
	menubar = false;
	scrollbars = true;
	toolbar = false;
	directories = false;
	
	var windowFeatures;
	windowFeatures = '';
	if (width != '')
		windowFeatures = windowFeatures+'width='+width+',';
	if (height != '')
		windowFeatures = windowFeatures+'height='+height+',';
	if (left != '')
		windowFeatures = windowFeatures+'left='+left+',';
	if (top != '')
		windowFeatures = windowFeatures+'top='+top+',';
	if (resizable)
		windowFeatures = windowFeatures+'resizable,';
	if (menubar)
		windowFeatures = windowFeatures+'menubar,';
	if (scrollbars)
		windowFeatures = windowFeatures+'scrollbars,';
	if (toolbar)
		windowFeatures = windowFeatures+'toolbar,';
	if (directories)
		windowFeatures = windowFeatures+'directories,';
	
	window.open(URL, windowName, windowFeatures);
}*/

/* Above function is blocked*/

function Popuparts(id,Pageaction)
{
	URL = 'newsdescription.php?news_id='+id;
	windowName = '';
	width = '550';
	height = '500';
	left = '0';
	//top = '0';
	resizable = false;
	menubar = false;
	scrollbars = true;
	toolbar = false;
	directories = false;
	
	var windowFeatures;
	windowFeatures = '';
	if (width != '')
		windowFeatures = windowFeatures+'width='+width+',';
	if (height != '')
		windowFeatures = windowFeatures+'height='+height+',';
	if (left != '')
		windowFeatures = windowFeatures+'left='+left+',';
	if (top != '')
		windowFeatures = windowFeatures+'top='+top+',';
	if (resizable)
		windowFeatures = windowFeatures+'resizable,';
	if (menubar)
		windowFeatures = windowFeatures+'menubar,';
	if (scrollbars)
		windowFeatures = windowFeatures+'scrollbars,';
	if (toolbar)
		windowFeatures = windowFeatures+'toolbar,';
	if (directories)
		windowFeatures = windowFeatures+'directories,';
	
	window.open(URL, windowName, windowFeatures);
}

function Popuparts1(id,Pageaction)
{
	URL = 'marketresearchdescription.php?marketresearch_id='+id;
	windowName = '';
	width = '550';
	height = '500';
	left = '0';
	//top = '0';
	resizable = false;
	menubar = false;
	scrollbars = true;
	toolbar = false;
	directories = false;
	
	var windowFeatures;
	windowFeatures = '';
	if (width != '')
		windowFeatures = windowFeatures+'width='+width+',';
	if (height != '')
		windowFeatures = windowFeatures+'height='+height+',';
	if (left != '')
		windowFeatures = windowFeatures+'left='+left+',';
	if (top != '')
		windowFeatures = windowFeatures+'top='+top+',';
	if (resizable)
		windowFeatures = windowFeatures+'resizable,';
	if (menubar)
		windowFeatures = windowFeatures+'menubar,';
	if (scrollbars)
		windowFeatures = windowFeatures+'scrollbars,';
	if (toolbar)
		windowFeatures = windowFeatures+'toolbar,';
	if (directories)
		windowFeatures = windowFeatures+'directories,';
	
	window.open(URL, windowName, windowFeatures);
}
/*********
function checkpage(page)
{
	document.frm_article.page.value = page;
	document.frm_article.hidden_id.value = document.frm_article.hidden_id.value;
	document.frm_article.hiddenaction.value = document.frm_article.hiddenaction.value;
	document.frm_article.action = "ArticalMainPage.php";
	document.frm_article.submit();
}
**************************/
function checkpage(page)
{
	document.frm_article.page.value = page;
	id=document.frm_article.hiddencat_id.value ;
	document.frm_article.hidden_id.value = document.frm_article.hidden_id.value;
	document.frm_article.hiddenaction.value = document.frm_article.hiddenaction.value;
	//document.frm_article.action = "ArticalMainPage.php;
	document.frm_article.action = "ArticalMainPage.php?CatId="+id;
	document.frm_article.submit();
}
/***********************/


function Articlerating(id,memberid,ratingno)
{
	if(memberid==0)
	{
		alert("Please Login First");
		window.location="index.php";
	}
	else
	{
		window.location="artdescription.php?action=dispcomment"+"&article_id="+id+"&rating="+ratingno;
	}
}

function Newsrating(id,memberid,ratingno)
{
	if(memberid==0)
	{
		alert("Please Login First");
		window.location="index.php";
	}
	else
	{
		window.location="newsdescription.php?action=dispcomment"+"&news_id="+id+"&rating="+ratingno;
	}
}

function Researchrating(id,memberid,ratingno)
{
	if(memberid==0)
	{
		alert("Please Login First");
		window.location="index.php";
	}
	else
	{
		window.location="marketresearchdescription.php?action=dispcomment"+"&marketresearch_id="+id+"&rating="+ratingno;
	}
}

function GoToReply(id,commentid)
{
	window.location="comment_reply.php?action=reply"+"&articleid="+id+"&commid="+commentid;
}

function GoToNewsReply(id,commid)
{
	window.location="Newscomment_reply.php?action=newsreply"+"&newsid="+id+"&newscommid="+commid;
}

function GoToMarketReply(id,Mcommid)
{
	window.location="Marketcomment_reply.php?action=marketreply"+"&marketid="+id+"&marketcommid="+Mcommid;
}

function getmarket(id)
{
	document.frmmarket.marketresearch_id.value=id;
	document.frmmarket.action = "tell_frnd.php?marketresearch_id="+id;
	document.frmmarket.submit();
}
function RssFeedmarket(id)
{
	document.frmmarket.marketresearch_id.value=id;
	document.frmmarket.action = "rssfeed.php?marketresearch_id="+id;
	document.frmmarket.submit();
}

function getnews(id)
{
	document.frmnews.news_id.value=id;
	document.frmnews.action = "tell_frnd.php?news_id="+id;
	document.frmnews.submit();
}
function RssFeednews(id)
{
	document.frmnews.news_id.value=id;
	document.frmnews.action = "rssfeed.php?news_id="+id;
	document.frmnews.submit();
}

function getArticle(id)
{
	document.frmarticle.article_id.value = id;
	document.frmarticle.action = "tell_frnd.php?article_id="+id;
	document.frmarticle.submit();
}

function myaccount(memberid,id)
{
	if(memberid==0)
	{
		alert("Please Sign In or Sign Up First");
		window.location="plans.php";
		return false;
	}
	document.frmarticle.act.value="myaccount";
	document.frmarticle.article_id.value=id;
	document.frmarticle.submit();
}

function myaccount_news(memberid,id)
{
	if(memberid==0)
	{
		alert("Please Sign In or Sign Up First");
		window.location="plans.php";
		return false;
	}
	document.frmnews.act.value="myaccount";
	document.frmnews.news_id.value=id;
	document.frmnews.submit();
}

function myaccount_market(memberid,id)
{
	if(memberid==0)
	{
		alert("Please Sign In or Sign Up First");
		window.location="plans.php";
		return false;
	}
	document.frmmarket.act.value="myaccount";
	document.frmmarket.marketresearch_id.value=id;
	document.frmmarket.submit();
}

function myaccount_link(memberid,id)
{
	if(memberid==0)
	{
		alert("Please Sign In or Sign Up First");
		window.location="plans.php";
		return false;
	}
	document.frmlink.act.value="myaccount";
	document.frmlink.resource_id.value=id;
	document.frmlink.submit();
}

function getlink(id)
{
	document.frmlink.resource_id.value = id;
	document.frmlink.action = "tell_frnd.php?resource_id="+id;
	document.frmlink.submit();
}

function DeleteArticle(articleid)
{
	if(confirm("Are you sure to remove this article"))
	{
		document.frmarticle.article_id.value = articleid;
		return true;
	}
	else
		return false;
}

function RssFeedart(id)
{
	/*alert("hello");*/
	document.frmarticle.article_id.value = id;
	document.frmarticle.action = "rssfeed.php?article_id="+id;
	document.frmarticle.submit();
}