	var parent1;
	var subParent1;
	function GetParentId(parent, subParent)
	{
		parent1 = parent;
		subParent1 = subParent;
		//alert(subParent1);
	}
	
	function ForLeftControlHover(source, img1, img2)
	{	
		var str = source.id;
		var parent = parent1;
		var subParent = subParent1;
		var image1 = parent+'_'+subParent+'_'+img1;
		var image2 = parent+'_'+subParent+'_'+img2;
		//alert(image1);
					
		if(document.getElementById(str) != null)
		{
			document.getElementById(str).className = "HoverClass";
		}
		
		if(document.getElementById(image1) != null)
		{
			if (img1 == 'imgCircle')
				document.getElementById(image1).src = "../../Images/NewImages/new_left_round_gray.gif";
			else
				document.getElementById(image1).src = "../../Images/NewImages/mid33BG1.bmp";
		}
		
		if(document.getElementById(image2) != null)	
		{
			if (img2 == 'imgHelp')
			{
				document.getElementById(image2).src = "../../Images/NewImages/mid33GW.bmp";
			}
			else
			{			
				document.getElementById(image2).src = "../../Images/NewImages/mid33GB1.bmp";
			}
		}
	}
	
	function ForLeftControlOut(source, img1, img2)
	{
		var str = source.id;
		var parent = parent1;
		var subParent = subParent1;
		var image1 = parent+'_'+subParent+'_'+img1;
		var image2 = parent+'_'+subParent+'_'+img2;
		
		if(document.getElementById(str) != null)
			document.getElementById(str).className = "TDHREF";
		
		if(document.getElementById(image1) != null)
		{
			if (img1 == 'imgCircle')
				document.getElementById(image1).src = "../../Images/NewImages/Blue_round.gif";
			else
				document.getElementById(image1).src = "../../Images/NewImages/mid331.bmp";
		}
		if(document.getElementById(image2) != null)
		{
			if (img2 == 'imgHelp')
				document.getElementById(image2).src = "../../Images/NewImages/mid33BW2.bmp";
			else
				document.getElementById(image2).src = "../../Images/NewImages/mid331.bmp";
		}
	}
	
	
	function ForLeftControlHoverAlt(source)
	{	
		var str = source.id;
		var parent = parent1;
		var subParent = subParent1;
		var img1 = 'imgCircle';
		var img2 = 'imgHelp';
		var image1 = parent+'_'+subParent+'_imgCircle';
		var image2 = parent+'_'+subParent+'_imgHome';
		
		//alert(parent);
					
		if(document.getElementById(str) != null)
			document.getElementById(str).className = "HoverClassAlt";
			
		if((parent == 'HeaderControl1' && str == 'HeaderControl1_MenuHeader1_menuHome') || (parent == 'Footer1' && str == 'Footer1_MenuFooter1_menuFooterHome'))
		{
		if(document.getElementById(image1) != null)
		{
			if (img1 == 'imgCircle')
				document.getElementById(image1).src = "../../Images/NewImages/new_left_round_gray.gif";
			else
				document.getElementById(image1).src = "../../Images/NewImages/mid33BG1.bmp";
		}
		
		if(document.getElementById(image2) != null)	
		{
			if (img2 == 'imgHelp')
			{
				document.getElementById(image2).src = "../../Images/NewImages/mid33GW.bmp";
			}
			else
			{			
				document.getElementById(image2).src = "../../Images/NewImages/mid33GB1.bmp";
			}
		}
		}
		
		
	}
	
	function ForLeftControlOutAlt(source)
	{
		var str = source.id;
		var parent = parent1;
		var subParent = subParent1;
		var img1 = 'imgCircle';
		var img2 = 'imgHelp';
		var image1 = parent+'_'+subParent+'_imgCircle';
		var image2 = parent+'_'+subParent+'_imgHome';
		
		if(document.getElementById(str) != null)
			document.getElementById(str).className = "TDHREFAlt";
		//alert(parent);
		if((parent == 'HeaderControl1' && str == 'HeaderControl1_MenuHeader1_menuHome') || (parent == 'Footer1' && str == 'Footer1_MenuFooter1_menuFooterHome'))
		{
		if(document.getElementById(image1) != null)
		{
			if (img1 == 'imgCircle')
				document.getElementById(image1).src = "../../Images/NewImages/Blue_round.gif";
			else
				document.getElementById(image1).src = "../../Images/NewImages/mid331.bmp";
		}
		if(document.getElementById(image2) != null)
		{
			if (img2 == 'imgHelp')
				document.getElementById(image2).src = "../../Images/NewImages/mid33BW2.bmp";
			else
				document.getElementById(image2).src = "../../Images/NewImages/mid331.bmp";
		}
		}
		
	}

/*Added by Ravi Kumar Patel dated :- 01/19/2005

This fuction is used to get a print version of an article */
	
function getNewsLetterContent()
{
if (document.getElementById != null)
{
	var html = '<HTML>\n<HEAD>\n';
	if (document.getElementsByTagName != null)
	{
		var headTags = document.getElementsByTagName("head");
		if (headTags.length > 0)
			html += headTags[0].innerHTML;
	}
	html += '\n</HEAD>\n<BODY>\n<form name = frmform>\n';
	var printReadyElement1 = document.getElementById("div1");
	if (printReadyElement1 != null)
	{
		html += printReadyElement1.innerHTML;
	}
	html += '\n</div>\n</form>\n</BODY>\n</HTML>';
	var sReturnString = document.getElementById("txtNewsLetterContent");
	sReturnString.value = html;
//			var printWin = window.open();
//			printWin.document.open();
//			printWin.document.write(html);
	//return true;
}
else
{
	//return false;
}
}

/* Added by Amit Agarwal To chech weather user is logged in or not
This event is called when we are adding Attributes.Add of a control*/
function funCheckSession(sCheck)
{
if(sCheck == "")
{
	var str = window.location.toString().toLowerCase();
	str = str.substring(str.indexOf('/dotnetheaven/')+13);
	window.location.href('../User Registration/frmCheck.aspx?ReturnURL=..'+str);
	
	return false;
}
else
	return true;	
}


function funCheckSessionArticle(sCheck)
{
if(sCheck == "")
{
	var str = window.location.toString().toLowerCase();
	str = str.substring(str.indexOf('/dotnetheaven/')+13);
	window.location.href('../../../User Registration/frmCheck.aspx?ReturnURL=..'+str);
	return false; 
}
else
	return true;
}



/* Added By Ravi Kumar Patel to check login, valid author and for 
comfirmation message to perform an author action*/ 	
function funCheckSessionAndMsgAuthor(sUserID, sAuthor, sCommand)
{
if(sUserID == "")
{
	window.location.href('../../../User Registration/frmCheck.aspx');
	return false;
}
else if(sUserID != sAuthor)
{
	alert("You are not the author of the Message! So you are not permitted "+sCommand+" the Message");
	return false;
}
else
	return confirm(sCommand+" the Message!");			
}

//////////// All function used to print and download resumes(online and content) and print jobs

/*This fuction is used to get a print version of an article */
function GetPrintVersion() 
{
    var html = '<HTML>\n<HEAD>\n';
     if (document.getElementById != null) {
        
        if (document.getElementsByTagName != null) 
        {            
            var headTags = document.getElementsByTagName("head");
            if (headTags.length > 0)
                html += headTags[0].innerHTML;
        }
        
        html += '\n<script language = "javascript">';
        html += '\n function printWindow()\n{';
        html += ' var printReadyEle = document.getElementById("printContent");\nvar shtml = \'<HTML>\\n<HEAD>\\n\';\nif (document.getElementsByTagName != null)\n{\nvar sheadTags = document.getElementsByTagName("head");\nif (sheadTags.length > 0)\nshtml += sheadTags[0].innerHTML;\n}\nshtml += \'</HEAD>\\n<BODY>\\n\';\nif (printReadyEle != null)\n{\n';
        html += 'shtml += \'<form name = frmform1>\';\nshtml += printReadyEle.innerHTML;\n}\nshtml += \'\\n</form>\\n</BODY>\\n</HTML>\';\nvar printWin1 = window.open();\nprintWin1.document.open();\nwindow.parent.close();\nprintWin1.document.write(shtml);\nprintWin1.document.close();\nprintWin1.print();';
        html += '\n}\n</script>\n</HEAD>\n<BODY>\n';

        var printReadyElement1 = document.getElementById("Div1");
        var printReadyElement2 = document.getElementById("Div2");
        if (printReadyElement1 != null) 
        {
            html += '<form name = frmform>';
            html += '\n<div id = printContent>\n<table cellspacing = 0 cellpadding = 0 width = 100% class=grayBG>\n<tr>\n<td >Source : Mindcracker Network (<a href = "http://www.c-sharpcorner.com" class = specific>www.c-sharpcorner.com</a>) <input type = button value = Print class = "BlueButton"   onclick = "printWindow();"> </td>\n</tr>\n</table>\n';
            html += '<TABLE cellSpacing=0 cellPadding=10 width=100% border=0>\n<TR>\n<TD class=tblArticleHeadingBG>\n';
            html += printReadyElement1.innerHTML;
            html += '\n</td>\n</tr>\n</table>';
            html += '\n<table cellspacing = 0 cellpadding = 0 width = 100%>\n<tr class=grayBG>\n<td>&nbsp;</td>\n</td>\n</tr>\n</table>\n';
            if (printReadyElement2 != null) {
                html += '<TABLE cellSpacing=0 cellPadding=10 width=100% border=0 class=ArticlePublisherBackgroundWhite align = center>\n<TR>\n<TD>\n';
                html += printReadyElement2.innerHTML;
                html += '\n</td>\n</tr>\n</table>\n\n';
                html += '\n<table cellspacing = 0 cellpadding = 0 width = 100%>\n<tr>\n<td class=grayBG>Thank you for using Mindcracker Network</td>\n</tr>\n</table>\n';
            }
            else {
                alert("This article doesn't contains any content! Sorry for inconvenience");
                return;
            }
        }
        else 
        {
            alert("Could not find the header of this document");
            return;
        }

        html += '\n</div>\n</form>\n</BODY>\n</HTML>';

        var printWin = window.open();
        printWin.document.open();
        printWin.document.write(html);

    }
    else {
        alert("The print ready feature is only available if you are using an browser. Please update your browswer.");
    }
}	
//function GetPrintVersion()
//{
//if (document.getElementById != null)
//{
//	var html = '<HTML>\n<HEAD>\n';
//	if (document.getElementsByTagName != null)
//	{
//		var headTags = document.getElementsByTagName("head");
//		if (headTags.length > 0)
//			html += headTags[0].innerHTML;
//	}
//	html += '\n<script language = "javascript">';
//	html += '\n function printWindow()\n{';
//	html += '\nwindow.parent.close(); var printReadyEle = document.getElementById("printContent");\nvar shtml = \'<HTML>\\n<HEAD>\\n\';\nif (document.getElementsByTagName != null)\n{\nvar sheadTags = document.getElementsByTagName("head");\nif (sheadTags.length > 0)\nshtml += sheadTags[0].innerHTML;\n}\nshtml += \'</HEAD>\\n<BODY>\\n\';\nif (printReadyEle != null)\n{\n';
//	html += 'shtml += \'<form name = frmform1>\';\nshtml += printReadyEle.innerHTML;\n}\nshtml += \'\\n</form>\\n</BODY>\\n</HTML>\';\nvar printWin1 = window.open();\nprintWin1.document.open();\nprintWin1.document.write(shtml);\nprintWin1.document.close();\nprintWin1.print();';
//	html += '\n}\n</script>\n</HEAD>\n<BODY>\n';

//	var printReadyElement1 = document.getElementById("div1");
//	var printReadyElement2 = document.getElementById("div2");
//	if (printReadyElement1 != null)
//	{
//		html += '<form name = frmform>';
//		html += '\n<div id = printContent>\n<table cellspacing = 0 cellpadding = 0 width = 100%>\n<tr>\n<td width=30%>Source : Mindcracker.com (<a href = "http://www.Mindcracker.com" class = specific>www.Mindcracker.com</a>)</td><td align=left><input type = button width=200 value = "Send it to Printer" class = OrangeButton  onclick = "printWindow();"> </td>\n</tr>\n</table>\n';
//		html += '<TABLE cellSpacing=0 cellPadding=10 width=100% border=0>\n<TR>\n<TD>\n';
//		html += printReadyElement1.innerHTML;
//		html += '\n</td>\n</tr>\n</table>';
//		html += '\n<table cellspacing = 0 cellpadding = 0 width = 100%>\n<tr class=grayBG>\n<td>&nbsp;</td>\n</td>\n</tr>\n</table>\n';
//		if(printReadyElement2 != null)
//		{
//			html += '<TABLE cellSpacing=0 cellPadding=10 width=100% border=0 align = center>\n<TR>\n<TD>\n';
//			html += printReadyElement2.innerHTML;
//			html += '\n</td>\n</tr>\n</table>\n\n';
//			html += '\n<table cellspacing = 0 cellpadding = 0 width = 100%>\n<tr>\n<td class=grayBG>Thank you for using Mindcracker.com</td>\n</tr>\n</table>\n';
//		}
//		else
//		{
//			alert("This article doesn't contains any content! Sorry for inconvenience");
//			return;
//		}
//	}
//	else
//	{
//	    alert("Could not find the header of this document");
//		return;
//	}

//	html += '\n</div>\n</form>\n</BODY>\n</HTML>';
//        
//	var printWin = window.open();
//	printWin.document.open();
//	printWin.document.write(html);
//	
//}
//else
//{
//	alert("The print ready feature is only available if you are using an browser. Please update your browswer.");
//}
//}

//// Used to print content resume
//function getPrintPreview()
//{
//if (document.getElementById != null)
//{
//	var html = '<HTML>\n<HEAD>\n';
//	if (document.getElementsByTagName != null)
//	{
//		var headTags = document.getElementsByTagName("head");
//		if (headTags.length > 0)
//			html += headTags[0].innerHTML;
//	}
//	html += '\n<script language = "javascript">';
//	html += '\n function closeWindow()\n{';
//	html += '\n window.parent.close()}';
//	html += '\n function printWindow()\n{';
//	html += '\n window.parent.close(); ';
//	html += 'document.getElementById("btnPrint").style.visibility = "hidden" ;';
//	html += 'document.getElementById("btnCancel").style.visibility = "hidden" ;';
//	html += 'document.getElementById("btnPrintTop").style.visibility = "hidden" ;';
//	html += 'document.getElementById("btnCancelTop").style.visibility = "hidden" ;';
//	html += 'var printReadyEle = document.getElementById("printContent");\n var shtml = \'<HTML>\\n<HEAD>\\n\';\n if (document.getElementsByTagName != null)\n{\n var sheadTags = document.getElementsByTagName("head");\n if (sheadTags.length > 0)\n shtml += sheadTags[0].innerHTML;\n}\n shtml += \'</HEAD>\\n<BODY>\\n\';\n if (printReadyEle != null)\n{\n';
//	html += 'shtml += \'<form name = frmform1>\';\n shtml += printReadyEle.innerHTML;\n}\n shtml += \'\\n</form>\\n</BODY>\\n</HTML>\';\nvar printWin1 = window.open();\n printWin1.document.open();\n printWin1.document.write(shtml);\n printWin1.document.close();\n printWin1.print();';
//	html += '\n}\n</script>\n</HEAD>\n<BODY>\n';

//	var printReadyElement1 = document.getElementById("div1");
//	
//	if (printReadyElement1 != null)
//	{
//		html += '<form name = frmform>';
//		html += '\n<div id = printContent>\n';
//		html += '<table cellspacing = 0 cellpadding = 0 border=0 width = 100%>'
//		html += '<tr>';
//		html += '<td align=center><input type = button value = Print class = "BlueButton" id="btnPrintTop"  onclick = "printWindow();">&nbsp;';
//		html += '<input type = button value = Cancel class = "BlueButton" id="btnCancelTop"  onclick = "closeWindow();"> </td>';
//		html += '</tr>';
//		html += '</table><br>';
//		html += '<table cellspacing = 0 cellpadding = 0 width = 100% >\n<tr>\n<td  class="grayBG">Source : Mindcracker (<a href = "http://www.Mindcracker.com" target=_blank class = specific>Mindcracker.com</a>)</td>\n</tr>\n</table>\n';
//		html += printReadyElement1.innerHTML;
//	}
//	else
//	{
//		alert("Could not find the header of this document");
//		return;
//	}

//	html += '<br><table cellspacing = 0 cellpadding = 0 border=0 width = 100%>\n<tr>\n<td class="grayBG">Thank you for using Mindcracker</td>\n</tr>\n</table>\n';
//	html += '\n</td>\n</tr>\n</table><br>';
//	html += '<table cellspacing = 0 cellpadding = 0 border=0 width = 100%>'
//	html += '<tr>';
//	html += '<td align=center><input type = button value = Print class = "BlueButton" id="btnPrint"  onclick = "printWindow();">&nbsp;';
//	html += '<input type = button value = Cancel class = "BlueButton" id="btnCancel"  onclick = "closeWindow();"> </td>';
//	html += '</tr>';
//	
//	html += '</table>';
//	html += '\n</div>\n</form>\n</BODY>\n</HTML>';
//	
//	//var reg = /class=\w/gi;
//	//html = html.replace(reg,'');

//	var printWin = window.open();
//	printWin.document.open();
//	printWin.document.write(html);
//	
//}
//else
//{
//	alert("The print ready feature is only available if you are using an browser. Please update your browser.");
//}
//}

// Used to save online resume
 
function SavePreview()
{
if (document.getElementById != null)
{
	var html = '<HTML>\n<HEAD>\n';
	if (document.getElementsByTagName != null)
	{
		var headTags = document.getElementsByTagName("head");
		if (headTags.length > 0)
			html += headTags[0].innerHTML;
	}
	html += '\n<script language = "javascript">';
	html += '\n function closeWindow()\n{';
	html += '\n window.parent.close()}';
	html += '\n function printWindow()\n{';
	html += '\n window.parent.close(); ';
	html += 'document.getElementById("btnSave").style.visibility = "hidden" ;';
	html += 'document.getElementById("btnCancel").style.visibility = "hidden" ;';
	html += 'document.getElementById("btnSaveTop").style.visibility = "hidden" ;';
	html += 'document.getElementById("btnCancelTop").style.visibility = "hidden" ;';
	html += '\n window.parent.close(); var printReadyEle = document.getElementById("printContent");\n var shtml = \'<HTML>\\n<HEAD>\\n\';\nif (document.getElementsByTagName != null)\n{\n var sheadTags = document.getElementsByTagName("head");\n if (sheadTags.length > 0)\n shtml += sheadTags[0].innerHTML;\n}\nshtml += \'</HEAD>\\n<BODY>\\n\';\n if (printReadyEle != null)\n{\n';
	html += 'shtml += \'<form name = frmform1>\';\n shtml += printReadyEle.innerHTML;\n}\n shtml += \'\\n</form>\\n</BODY>\\n</HTML>\';\n var printWin1 = window.open();\n printWin1.document.open();\n printWin1.document.write(shtml);\n printWin1.document.close();\n printWin1.execCommand(\'SaveAs\',\'1\',\'.htm\');';
	html += '\n}\n</script>\n</HEAD>\n<BODY>\n';

	var printReadyElement1 = document.getElementById("HiddenValue");
	if (printReadyElement1 != null)
	{
		html += '<form name = frmform>';
		html += '\n<div id = printContent>\n';
		html += '<table cellspacing = 0 cellpadding = 0 border=0 width = 100%>'
		html += '<tr>';
		html += '<td align=center><input type=button value=Save class = "BlueButton" id="btnSaveTop"  onclick="document.execCommand(\'SaveAs\',\'1\',\'.txt\')";>&nbsp;';
		html += '<input type = button value = Cancel class = "BlueButton" id="btnCancelTop"  onclick = "closeWindow();"> </td>';
		html += '</tr>';
		html += '</table><br>';
		html += '<table cellspacing = 0 cellpadding = 0 width = 100% >\n<tr>\n<td  class="grayBG">Source : Mindcracker (<a href = "http://www.Mindcracker.com" target=_blank class = specific>Mindcracker.com</a>)</td>\n</tr>\n</table>\n';
		html += printReadyElement1.value;
	}
	else
	{
		alert("Could not find the header of this document");
		return;
	}

	html += '<br><table cellspacing = 0 cellpadding = 0 border=0 width = 100%>\n<tr>\n<td class="grayBG">Thank you for using Mindcracker</td>\n</tr>\n</table>\n';
	html += '\n</td>\n</tr>\n</table><br>';
	html += '<table cellspacing = 0 cellpadding = 0 border=0 width = 100%>'
	html += '<tr>';
	html += '<td align=center><input type=button value=Save class = "BlueButton" id="btnSave"  onclick="document.execCommand(\'SaveAs\',\'1\',\'.txt\')";>&nbsp;';
	html += '<input type = button value = Cancel class = "BlueButton" id="btnCancel"  onclick = "closeWindow();"> </td>';
	html += '</tr>';
	
	html += '</table>';
	html += '\n</div>\n</form>\n</BODY>\n</HTML>';
	
	//var reg = /class=\w/gi;
	//html = html.replace(reg,'');

	var printWin = window.open();
	printWin.document.open();
	printWin.document.write(html);
	
}
else
{
	alert("The print ready feature is only available if you are using an browser. Please update your browser.");
}
}

// Used to save content resume
function getSavePreview()
{	
if (document.getElementById != null)
{
	var html = '<HTML>\n<HEAD>\n';
	if (document.getElementsByTagName != null)
	{
		var headTags = document.getElementsByTagName("head");
		if (headTags.length > 0)
			html += headTags[0].innerHTML;
	}
	html += '\n<script language = "javascript">';
	html += '\n function closeWindow()\n{';
	html += '\n window.parent.close()}';
	html += '\n function printWindow()\n{';
	html += '\n window.parent.close(); ';
	html += 'document.getElementById("btnSave").style.visibility = "hidden" ;';
	html += 'document.getElementById("btnCancel").style.visibility = "hidden" ;';
	html += 'document.getElementById("btnSaveTop").style.visibility = "hidden" ;';
	html += 'document.getElementById("btnCancelTop").style.visibility = "hidden" ;';
	html += '\n window.parent.close(); var printReadyEle = document.getElementById("printContent");\n var shtml = \'<HTML>\\n<HEAD>\\n\';\nif (document.getElementsByTagName != null)\n{\n var sheadTags = document.getElementsByTagName("head");\n if (sheadTags.length > 0)\n shtml += sheadTags[0].innerHTML;\n}\nshtml += \'</HEAD>\\n<BODY>\\n\';\n if (printReadyEle != null)\n{\n';
	html += 'shtml += \'<form name = frmform1>\';\n shtml += printReadyEle.innerHTML;\n}\n shtml += \'\\n</form>\\n</BODY>\\n</HTML>\';\n var printWin1 = window.open();\n printWin1.document.open();\n printWin1.document.write(shtml);\n printWin1.document.close();\n printWin1.execCommand(\'SaveAs\',\'1\',\'.htm\');';
	html += '\n}\n</script>\n</HEAD>\n<BODY>\n';

	var printReadyElement1 = document.getElementById("Div2");
	if (printReadyElement1 != null)
	{
		html += '<form name = frmform>';
		html += '\n<div id = printContent>\n';
		html += '<table cellspacing = 0 cellpadding = 0 border=0 width = 100%>'
		html += '<tr>';
		html += '<td align=center><input type=button value=Save class = "BlueButton" id="btnSaveTop"  onclick="document.execCommand(\'SaveAs\',\'1\',\'.txt\')";>&nbsp;';
		html += '<input type = button value = Cancel class = "BlueButton" id="btnCancelTop"  onclick = "closeWindow();"> </td>';
		html += '</tr>';
		html += '</table><br>';
		html += '<table cellspacing = 0 cellpadding = 0 width = 100% >\n<tr>\n<td  class="grayBG">Source : Mindcracker (<a href = "http://www.Mindcracker.com" target=_blank class = specific>Mindcracker.com</a>)</td>\n</tr>\n</table>\n';
		html += printReadyElement1.innerHTML;
	}
	else
	{
		alert("Could not find the header of this document");
		return;
	}

	html += '<br><table cellspacing = 0 cellpadding = 0 border=0 width = 100%>\n<tr>\n<td class="grayBG">Thank you for using Mindcracker</td>\n</tr>\n</table>\n';
	html += '\n</td>\n</tr>\n</table><br>';
	html += '<table cellspacing = 0 cellpadding = 0 border=0 width = 100%>'
	html += '<tr>';
	html += '<td align=center><input type=button value=Save class = "BlueButton" id="btnSave"  onclick="document.execCommand(\'SaveAs\',\'1\',\'.txt\')";>&nbsp;';
	html += '<input type = button value = Cancel class = "BlueButton" id="btnCancel"  onclick = "closeWindow();"> </td>';
	html += '</tr>';
	
	html += '</table>';
	html += '\n</div>\n</form>\n</BODY>\n</HTML>';
	
	//var reg = /class=\w/gi;
	//html = html.replace(reg,'');

	var printWin = window.open();
	printWin.document.open();
	printWin.document.write(html);
	
}
else
{
	alert("The print ready feature is only available if you are using an browser. Please update your browser.");
}
}

////////////////////////////////////////////////////////////////////

function fun()
{
return confirm("Are you sure want to delete? ");	     
}
  
function ActionConfirm(action)
{
return confirm(action);	     
}


var check = 'full';
function CheckUnCheck(ctrlName,temp,count)
{
    var table = document.getElementById (ctrlName);
    var cells = table.getElementsByTagName("td");		
    var ctlr;
    var numberChecks = 0;				
    if ( check == 'empty')
    {
	    for (var i = 0; i < count; i ++)
	    {
		    ctrl = cells[i].firstChild;
		    if (ctrl.type == 'checkbox')
		    {
			    if(document.getElementById(ctrlName+"_0").checked == true)
			    {
				    ctrl.checked = true;							 
				    if(i == count - 1)
					    check = 'full';
			    }
		    }
	    }
    }
    else if ( check == 'full')
    {
	    for (var i = 0; i < count; i++)
	    {
		    ctrl = cells[i].firstChild;
		    if (ctrl.type == 'checkbox')
		    {
			    if(document.getElementById(ctrlName+"_0").checked == false)
			    {
				    ctrl.checked = false; 
			    }
			    else
			    {
				    if(i == count - 1)
					    document.getElementById(ctrlName+"_0").checked = false;
			    }
			    if(i == count -1)
			    {
				    check = 'empty';						
			    }
		    }
	    }
    }				
    for (var i = 1; i < count; i++)
    {
	    ctrl = cells[i].firstChild;
	    if (ctrl.type == 'checkbox')
	    {
		    if ( ctrl.checked == true)
			    numberChecks ++;
		    if ( ctrl.checked == false)
			    numberChecks --;
	    }
    }				
    if ( numberChecks == count - 1)
    {
	    document.getElementById(ctrlName+"_0").checked = true;
	    check = 'full';
    }
}


// Added by shobha on apr 20
function add (var1, var2, hiddenvar)
{
var hiddenvalue;
var str = document.Form1;
var flag = 0;
while(flag < str.elements.length)
{
	if(str.elements[flag].name == var1)
	{
		obj1 = str.elements[flag];
		break;
	}
	flag ++;
}
	
var flag = 0;
while(flag < str.elements.length)
{
	if(str.elements[flag].name == var2)
	{
		obj2 = str.elements[flag];
		break;
	}
	flag ++;
}

var flag = 0;
while(flag < str.elements.length)
{
	if(str.elements[flag].name == hiddenvar)
	{
		hidden_name = str.elements[flag];
		break;
	}
	flag ++;
}

if (obj1.options.length == 0)
;
	//else if(obj1.options.value == " ")
	//	;
else
{
	var k = 0;
	var len_obj2 = obj2.length;
	while(k < obj1.options.length)
	{
		if(obj1.options[k].selected)
		{
			var arr = new Option();
			if (obj1.options[k].value != "Others")
			{
				arr.value = obj1.options[k].value;
				arr.text = obj1.options[k].text;
			
				for(i = 0;i < obj2.options.length;i++)
				{
					if(obj2[i].value == arr.value)
					{
						var repeat_name = true;
						break;
					}
				}
				if(repeat_name == true)
				{
					repeat_name = false;
				}
				else
				{
					if (arr.value == "Any" || arr.value == "0")
						obj2.options.length = 0;
					else
					{
						for(var l = 0; l < obj2.options.length; l++)
						if(obj2.options[l].value == "Any" || obj2.options[l].value == "0")
							obj2.options[l] = null;
					}

					obj2.options[obj2.options.length] = arr;
				}
			}
		}
		k++;
	}
	
}

var k = 0, str1 = '',str2;
while(k < obj2.options.length)
{
	str2 = "'" + obj2.options[k].value + "'";
	str1 = str1 + str2 + ",";
	k ++;
}
hidden_name.value = str1;
}

function remove(var1,var2,hiddenvar)
{
var str=document.Form1;
var flag=0;
while(flag<str.elements.length)
{
	if(str.elements[flag].name==var1)
	{
		obj1=str.elements[flag];
		break;
	}
	flag++;
}
var flag=0;
while(flag<str.elements.length)
{
	if(str.elements[flag].name==var2)
	{
		obj2=str.elements[flag];
		break;
	}
	flag++;
}
var flag=0;
while(flag<str.elements.length)
{
	if(str.elements[flag].name==hiddenvar)
	{
		hidden_name=str.elements[flag];
		break;
	}
	flag++;
}
if(obj2.options.length == 0)
;
else
{
	while(obj2.selectedIndex != -1)
	{
		for(var i=(obj2.options.length -1);i >= 0;i--)
		if(obj2.options[i].selected == true)
		{
			obj2.options[i]= null;
		}
	}

}

if(obj2.options.length == 0)
{
	var arr = new Option();
	arr.value = obj1.options[0].value;
	arr.text = obj1.options[0].text;
	obj2.options[obj2.options.length] = arr;
}
var k = 0,str1 = '', str2;
while(k < obj2.options.length)
{
	str2 = "'" + obj2.options[k].value + "'";
	str1 = str1 + str2 + ",";
	k ++;
}
hidden_name.value=str1;
}


function funTrapKD(btn, event)
	{
		if (document.all)
		{
			if (event.keyCode == 13)
			{
				event.returnValue=false;
				event.cancel = true;
				btn.click();
			}
		}
		else if (document.getElementById)
		{
			if (event.which == 13)
			{
				event.returnValue=false;
				event.cancel = true;
				btn.click();
			}
		}
		else if(document.layers)
		{
			if(event.which == 13)
			{
				event.returnValue=false;
				event.cancel = true;
				btn.click();
			}
		}
	}

	function ClearDatesAll(startDate, endDate)
    {
     if (confirm("You want to clear it?")) 
     {
         document.getElementById(startDate).value = "";
         document.getElementById(endDate).value = "";
     }
     else 
     {
         
     }
//    alert(" You want to clear it?");	
//	document.getElementById(startDate).value = "";
//	document.getElementById(endDate).value = "";
    }	

function ClearDates(endDate) {
    if (confirm("You want to clear it?"))
     {
        document.getElementById(endDate).value = "";
     }
//    alert("You want to clear it?");
//	document.getElementById(endDate).value = "";
}		

function JobComment()
{
    alert("Sorry! You cannot post a job until your profile get active.");
}
