//show CloseTalkBack button in place of AddTalkback button
function showCloseBtn(CloseBtnID,sGlobalPath,AddTalkbackButtonImg,ArticleGUID)
{
	
	var spanObj = document.getElementById(CloseBtnID);

	if (spanObj != null)
	{
		spanObj.innerHTML = "<IMG height='21' onmouseover=\"this.style.cursor='hand'\" onmouseout=\"this.style.cursor='arrow'\" id='ShowHideTalkbackAdd' src='"+sGlobalPath+"/TalkBacks/images/close_talkback.gif' width='100' border='0'  onclick=\"showAddBtn('"+CloseBtnID+"','"+sGlobalPath+"','"+AddTalkbackButtonImg+"','"+ArticleGUID+"'); hideAdd();\">";
	}
}


//show AddTalkback  button in place of  CloseTalkBack button
function showAddBtn(CloseBtnID,sGlobalPath,AddTalkbackButtonImg,ArticleGUID)
{	
	var spanObj = document.getElementById(CloseBtnID);
	if (spanObj != null)
	{
		spanObj.innerHTML = "<IMG height='21' id='ShowHideTalkbackAdd' src='"+sGlobalPath+"/TalkBacks/images/"+AddTalkbackButtonImg+"' width='100' border='0'  onclick=\"showAdd('0','"+ArticleGUID+"','"+sGlobalPath+"',291,407);showCloseBtn('"+CloseBtnID+"','"+sGlobalPath+"','"+AddTalkbackButtonImg+"','"+ArticleGUID+"');\">";	
	}
}


// ****************


//show CloseTalkBack button in place of AddTalkback button
function showCloseBtnWidth(CloseBtnID,AddTalkTDID,sGlobalPath,AddTalkbackButtonImg,ArticleGUID)
{
	var spanObj = document.getElementById(CloseBtnID);
	var tdObj = document.getElementById(AddTalkTDID);
	
	if (spanObj != null)
	{
		//test
		spanObj.innerHTML = "<IMG height='21' onmouseover=\"this.style.cursor='hand'\" onmouseout=\"this.style.cursor='arrow'\" id='ShowHideTalkbackAdd' src='"+sGlobalPath+"/TalkBacks/images/close_talkback.gif' width='100' border='0'  onclick=\"showAddBtnWidth('"+CloseBtnID+"','"+AddTalkTDID+"','"+sGlobalPath+"','"+AddTalkbackButtonImg+"','"+ArticleGUID+"'); hideAdd();\"><BR>";		
	}
	
	if (tdObj != null)
	{
		tdObj.style.display = "block";
	}
}


//show AddTalkback  button in place of  CloseTalkBack button
function showAddBtnWidth(CloseBtnID,AddTalkTDID,sGlobalPath,AddTalkbackButtonImg,ArticleGUID)
{	
	var spanObj = document.getElementById(CloseBtnID);
	var tdObj = document.getElementById(AddTalkTDID);
		
	if (spanObj != null)
	{
		spanObj.innerHTML = "<IMG height='21' onmouseover=\"this.style.cursor='hand'\" onmouseout=\"this.style.cursor='arrow'\" id='ShowHideTalkbackAdd' src='"+sGlobalPath+"/TalkBacks/images/"+AddTalkbackButtonImg+"' width='100' border='0'  onclick=\"showAdd('0','"+ArticleGUID+"','"+sGlobalPath+"',290,407); showCloseBtnWidth('"+CloseBtnID+"','"+AddTalkTDID+"','"+sGlobalPath+"','"+AddTalkbackButtonImg+"','"+ArticleGUID+"')\">";
		
	}
	
	if (tdObj != null)
	{
		tdObj.style.display = "none";
	}
}

// *****************************

function ConfirmDelete()
{
	if (!confirm('!!האם ברצונך למחוק הפול הזה? כל האפשריות והתוצאות גם ימחקו'))
		event.returnValue = false;
}

function ShowResults(pollId)
{
	 var sUrl = 'VotePopup.aspx?PollId=' + pollId;
	 sFeatures = "toolbar=0,width=500,height=400,directories=no,status=no,scrollbars=no,resizable=no,menubar=no";
	 var newWin = window.open(sUrl,"_blank",sFeatures);
	 newWin.focus();
	 event.returnValue = false;

}
function SendEditorMail(mailtoLink)
{
	link = "about:blank";
    var printWindow = window.open(link, "_new","location=0,status=0,scrollbars=0,width=100,height=100");
    printWindow.document.open();
    printWindow.document.write(makepage(mailtoLink));
    printWindow.document.close();
}
function makepage(mailto_link)
{
    return "<html>\n" +
    "<head>\n" +
    "<title></title>\n" +
    "<meta http-equiv=content-type content=text/html; charset=1255>\n" +
    "<script>\n" +
    "function closeMe() {\n" +
	"  win = window.open('" + mailto_link + "','emailWindow');\n" +
    "  window.close();\n" +
    "}\n" +
    "</scr" + "ipt>\n" +
    "</head>\n" +
    "<body onLoad='self.blur(); closeMe()'></body>\n" +
    "</html>\n";
}


