function f_showMsg(as_msg,al_icon,as_title)  {
	//var ll_rc=window.showModalDialog("msgWin.asp?msg=" + as_msg + "&icon=" + al_icon +"&title=" + as_title,"","dialogHeight:150px;dialogWidth:330px;help:no;resizable:no;status:no;scroll:no;")
	//return ll_rc;
	alert(as_msg);
}

// confirming the delete action does not invoke a delete action,
// it sends relevant information in the querystring,
// and the decision whether to use this info or not is taken in the server side 
function confirmDelete(msg,deletePostingGuid){
	if (confirm(msg)){
		var curUrl = document.location.href;
		curUrl += "&deletePostingGuid="+deletePostingGuid;
		document.location.href=curUrl;
	}
	else 
	location.href ='#';
}

// confirming the delete action does not invoke a delete action,
// it sends relevant information in the querystring,
// and the decision whether to use this info or not is taken in the server side 
function confirmHTMLPlaceHolderDelete(msg,deleteHTMLPlaceholderGuid,id){
	if (confirm(msg)){
		var curUrl = document.location.href;
		curUrl += "&deleteHTMLPlaceholderGuid="+deleteHTMLPlaceholderGuid+"&PlaceHolderDefenitionID="+id;
		document.location.href=curUrl;
	}
	else return false;
}

// changes the css of a cell in the sub navigation when the mouse over
function onSideMenu(cell){
	cell.className="SubNavigationSubjectHover";
}

// changes the css of a cell in the sub navigation when the mouse out
function offSideMenu(cell){
	cell.className="SubNavigationSubject";
}

function sorting(thisID,definition,direction)
{
	var oColToSort = document.getElementById(thisID+"_tBoxColToSort");
	if (oColToSort == null)
		oColToSort = document.getElementById(thisID+":tBoxColToSort");
	var oSortDir = document.getElementById(thisID+"_tBoxSortDir");
	if (oSortDir == null)
		oSortDir = document.getElementById(thisID+":tBoxSortDir");		
	if(oColToSort.value == definition)
	{
		
		if(direction == "ASC")
		{ 
			if(oSortDir.value == direction)
			{ 
				oSortDir.value="DESC";
			}
			else
			{
				oSortDir.value="ASC";
			}
		}
		else
		{
			if(oSortDir.value == direction)
			{ 
				oSortDir.value="ASC";
			}
			else
			{
				oSortDir.value="DESC";
			}
		}
	}
	else
	{
		oColToSort.value=definition;
		oSortDir.value=direction;
	}
	__doPostBack('','');
}

// Script add by debis ajax
/*
 * validateForm - For use in conjunction with InfraWise inputField Validator
 */
function validateForm(form)
{
	if (!form)
		{form=window.document.forms[0].id}
	
	var inputFields=window.document.forms[form].tags('input');
	for (i=0; i<inputFields.length; ++i)
	{
		if (inputFields[i].className.indexOf('IWInputField')>-1)
		{
			if (!inputFields[i].isValid())
				return false;								
		}
	}
	
	return true;
}


function onLoadFunction()
{
	
}


function changeImage(ctrl,parmeter)
	{
		
		if(parmeter == 'on')
		{
			ctrl.src = ctrl.src.replace(".gif","_on.gif");
		}
		else
		{
			ctrl.src = ctrl.src.replace("_on","");
		}
	}
function handleDescQuestion(imgObj, trNumber)
{
	

	var descTD = document.getElementById("FAQCollector1_desc_" + trNumber);
	var beforeStyle = descTD.style.display;
	

	var allTR = document.getElementsByTagName("TR");
	for(i = 0 ; i < allTR.length ; i++)
	{
		if(allTR[i].id.indexOf("FAQCollector1_desc_") > -1)
		{

			if(allTR[i].style.display == "")
			{
				allTR[i].style.display = "none";
				
			}
		}	
	}
	
	if (beforeStyle == "none")
	{
		descTD.style.display = "";
		/*if (tdNumber % 2 == 0)
		{	
			imgObj.src = imgObj.src.replace("answer.gif", "CloseDark.gif");
		}
		else
		{
			imgObj.src = imgObj.src.replace("answer.gif", "CloseLight.gif");
		}
*/
	}
	else 
	{
		descTD.style.display = "none";		
		/*if (tdNumber % 2 == 0)
			{	
				imgObj.src = imgObj.src.replace("CloseDark.gif", "answer.gif");
			}
		else{
				imgObj.src = imgObj.src.replace("CloseLight.gif", "answer.gif")
			}
*/
	}
}
function isNullOrUndefined ( o )
{
    var isNullOrUndefined = ( o === null )      || ( o == null )      ||
                            ( o === undefined ) || ( o == undefined ) ||
                            ( typeof( o ) == "undefined" );
    return isNullOrUndefined;
}

function notNullOrUndefined (o)
{
    var notNullOrUndefined = (!isNullOrUndefined(o));
    return notNullOrUndefined;
}

if (!document.getElementById) {
	document.getElementById=function (id) {
		if (document.all) {
			return document.all[id];
		}
	}
}
function changeStyle(myTR,newClass)
{
	
	myTR.className = newClass;
}
//Open new windows(PopUp) with special size and ToolBar option
function openWinSizeToolbar(url,paramWidth,paramHeight,paramTool){ //open a pop up with the requested size in top left corner
	window.open(url,'',"width="+paramWidth+" height="+paramHeight+" left=0 top=0 resizable scrollbars toolbar="+paramTool+" location=no");
}

function checkEmpty()
{
	var str = document.getElementById("searchInput").value;
	if (str == null || str == "")
	{
		return false;
	}
	else
	{
		return true;
	}
}