
			function fckeOpen(ta) //opens fckeditor
			{//<a href="fcke.php?ta=description" target="_blank">Editor</a> 
			//<a style="cursor:hand;text-decoration:underline;" onClick="fckeOpen('description')" >Editor2</a>
			NewWin = window.open('fcke.php?ta='+ ta +'','','');
			//alert(NewWin.document.getElementById('MyTextarea'))//NewWin.document.getElementById('prevVal').value = document.getElementById(ta).value;//document.text
			//alert(NewWin.document.getElementById("prevVal").value)
			//alert(NewWin.document.all.html);//document.text
			//NewWin.document.open();
			// //NewWin.document.write("<input type=hidden id=fckHID value=al>");
			//NewWin.document.close();
			}
			
function setFCKEVal(ta)
{//   <body onUnload="setFCKEVal();">
//to set value of the fckeditor's contents on the opener documents Textarea

opener.document.getElementById(ta).value = document.getElementById("MyTextarea").value ;
//window.close();
}
function IfExists(src1, src2)
{
src1val = document.getElementById(src1).value ;
src1val2LC = trim_it(src1val.toLowerCase()) ;//alert()
total_options = document.getElementById(src2).length ;
	for(gg = 0; gg < total_options ; gg++ )
	{
	src2text = document.getElementById(src2).options[gg].text ;
	src2text = src2text.toLowerCase();
		if(src2text == src1val2LC)
		{
			alert(src1val +" already Exists ! \nPlease change the name ");
			document.getElementById(src2).options[gg].selected = true ;
			document.getElementById(src1).value = ""; 
			break;
		}
		//alert(gg + src2text);
	}//for


}//fnc


function chngFormAction(newAction,formNM) //event_entry.phps//<a href="javascript:chngFormAction('<?php echo $_SERVER['PHP_SELF']; ?>','event_entry_form' )">getLast</a> 
{
 //er = document.getElementById(formNM).id ;
 //alert(er);
 document.getElementById(formNM).action = newAction;
 document.getElementById(formNM).submit();
  
}
function show_ans(lyr) // menu.php
{
//eval(lyr).style.visibility = "visible";
document.getElementById(lyr).style.visibility = "visible";
///document.getElementById("menubar").style.fontWeight = "bold" ;
//document.getElementById("menubar").style.backgroundColor = "#E2E1D6";
document.getElementById("menubar").style.borderBottom = "solid #E2E1b6 1px";
document.getElementById("menubar").style.borderRight = "solid #E2E1b6 1px";
document.getElementById(lyr).style.borderTop = "solid #E2E1b6 1px";
document.getElementById(lyr).style.borderLeft = "solid #E2E1b6 1px";
//Layer1.style.visibility = "visible";
}
function dim_ans(lyr)// menu.php
{
document.getElementById(lyr).style.visibility = "hidden";
document.getElementById("menubar").style.backgroundColor = "";

//eval(lyr).style.visibility = "hidden";
//Layer1.style.visibility = "hidden";
}
function setSpanVal(srs,dest)//event_entry.php
{

document.getElementById(dest).innerHTML = document.getElementById(srs).value ;
}
function getVal(srs,dest)//event_entry.php
{
document.getElementById(dest).value = document.getElementById(srs).value ;
}
function getSelectedVal(srs,dest)//event_entry.php
{
document.getElementById(dest).value = document.getElementById(srs).options[document.getElementById(srs).selectedIndex].value ;
//alert(document.getElementById(dest).value);
}
function getSelectedText(srs,dest)//event_entry.php
{//getSelectedText(this.id,'eventName');
document.getElementById(dest).value = document.getElementById(srs).options[document.getElementById(srs).selectedIndex].text  ;
}
//__________________________________from year.js__________________

function wrt_dy_ASC_yr(select_name)
{
alert(select_name)
current_year = new Date().getFullYear()
//alert(current_year);
year_dy_value = "<select name='"+select_name+"'>";
origin_year = 1971;

	for(i = origin_year ; i <= parseInt(current_year) ; i++)
	{
	//document.write(i + '<br>');
	year_dy_value  += "<option value='"+i+"'>"+i+"</option>";
	}
year_dy_value  += "</select>";

document.write(year_dy_value);	
}// end wrt_dy_ASC_yr()
function wrt_dy_ASC_yr_wval(first_year, last_year , sorting)
{ 
//wrt_dy_ASC_yr_wval(0, 0, 'a') present year (2005)
//wrt_dy_ASC_yr_wval(2, 1, 'a') 2003 2004
//wrt_dy_ASC_yr_wval(0, -1, 'a') 2005 2006
//wrt_dy_ASC_yr_wval(-1, -1, 'a') 2006
//wrt_dy_ASC_yr_wval(2, 2 , 'a') present year
//wrt_dy_ASC_yr_wval(3, 15 , 'd') 2002 1990
//wrt_dy_ASC_yr_wval(15, 3 , 'a') 1990 2002

current_year = parseInt(new Date().getFullYear());

first_year = current_year - first_year;
last_year = current_year - last_year;

//alert(current_year);
//year_dy_value = "<select name='year'>";
year_dy_value = "";
//origin_year = 1971;
 
  if(sorting == 'a')
  {
	for(i = first_year ; i <= last_year ; i++) //asc
	{
	//document.write(i + '<br>');
	year_dy_value  += "<option value='"+i+"'>"+i+"</option>";
	}
  } 
  else if(sorting == 'd')
  {
	
	for(i = first_year ; i >= last_year ; i--)//desc
	{
	//document.write(i + '<br>');
	year_dy_value  += "<option value='"+i+"'>"+i+"</option>";
	}
  }
//year_dy_value  += "</select>";

document.write(year_dy_value);	
}// end wrt_dy_ASC_yr()

function wrt_dy_DESC_yr()
{
current_year = new Date().getFullYear()
//alert(current_year);
year_dy_value = "<select name='year'>";

origin_year = 1971;
	for(i = parseInt(current_year) ; i >= origin_year ; i--)
	{
	//document.write(i + '<br>');
	year_dy_value  += "<option value='"+i+"'>"+i+"</option>";
	}
year_dy_value  += "</select>";

document.write(year_dy_value); // for getting the text write: return year_dy_value;	
}// end wrt_dy_DESC_yr()

function write_years()
{

year_value = "<select name='year'>";
year_value  += "<option value='2105'>2105</option>";
year_value  += "<option value='2104'>2104</option>"; 
year_value  += "<option value='2103'>2103</option>"; 
year_value  += "<option value='2102'>2102</option>";
year_value  += "<option value='2101'>2101</option>";
year_value  += "<option value='2100'>2100</option>";
year_value  += "<option value='2099'>2099</option>";
year_value  += "<option value='2098'>2098</option>";
year_value  += "<option value='2097'>2097</option>";
year_value  += "<option value='2096'>2096</option>";
year_value  += "<option value='2095'>2095</option>";
year_value  += "<option value='2094'>2094</option>";
year_value  += "<option value='2093'>2093</option>";
year_value  += "<option value='2092'>2092</option>";
year_value  += "<option value='2091'>2091</option>";
year_value  += "<option value='2090'>2090</option>";
year_value  += "<option value='2089'>2089</option>";
year_value  += "<option value='2088'>2088</option>";
year_value  += "<option value='2087'>2087</option>";
year_value  += "<option value='2086'>2086</option>";
year_value  += "<option value='2085'>2085</option>";
year_value  += "<option value='2084'>2084</option>";
year_value  += "<option value='2083'>2083</option>";
year_value  += "<option value='2082'>2082</option>";
year_value  += "<option value='2081'>2081</option>";
year_value  += "<option value='2080'>2080</option>";
year_value  += "<option value='2082'>2082</option>";
year_value  += "<option value='2081'>2081</option>";
year_value  += "<option value='2080'>2080</option>";
year_value  += "<option value='2079'>2079</option>";
year_value  += "<option value='2078'>2078</option>";
year_value  += "<option value='2077'>2077</option>";
year_value  += "<option value='2076'>2076</option>";
year_value  += "<option value='2075'>2075</option>";
year_value  += "<option value='2074'>2074</option>";
year_value  += "<option value='2073'>2073</option>";
year_value  += "<option value='2072'>2072</option>";
year_value  += "<option value='2071'>2071</option>";
year_value  += "<option value='2070'>2070</option>";
year_value  += "<option value='2069'>2069</option>";
year_value  += "<option value='2068'>2068</option>";
year_value  += "<option value='2067'>2067</option>";
year_value  += "<option value='2066'>2066</option>";
year_value  += "<option value='2065'>2065</option>";
year_value  += "<option value='2064'>2064</option>";
year_value  += "<option value='2063'>2063</option>";
year_value  += "<option value='2062'>2062</option>";
year_value  += "<option value='2061'>2061</option>";
year_value  += "<option value='2060'>2060</option>";
year_value  += "<option value='2059'>2059</option>";
year_value  += "<option value='2058'>2058</option>";
year_value  += "<option value='2057'>2057</option>";
year_value  += "<option value='2056'>2056</option>";
year_value  += "<option value='2055'>2055</option>";
year_value  += "<option value='2054'>2054</option>";
year_value  += "<option value='2053'>2053</option>";
year_value  += "<option value='2052'>2052</option>";
year_value  += "<option value='2051'>2051</option>";
year_value  += "<option value='2050'>2050</option>";
year_value  += "<option value='2049'>2049</option>";
year_value  += "<option value='2048'>2048</option>";
year_value  += "<option value='2047'>2047</option>";
year_value  += "<option value='2046'>2046</option>";
year_value  += "<option value='2045'>2045</option>";
year_value  += "<option value='2044'>2044</option>";
year_value  += "<option value='2043'>2043</option>";
year_value  += "<option value='2042'>2042</option>";
year_value  += "<option value='2041'>2041</option>";
year_value  += "<option value='2040'>2040</option>";
year_value  += "<option value='2039'>2039</option>";
year_value  += "<option value='2038'>2038</option>";
year_value  += "<option value='2037'>2037</option>";
year_value  += "<option value='2036'>2036</option>";
year_value  += "<option value='2035'>2035</option>";
year_value  += "<option value='2034'>2034</option>";
year_value  += "<option value='2033'>2033</option>";
year_value  += "<option value='2032'>2032</option>";
year_value  += "<option value='2031'>2031</option>";
year_value  += "<option value='2030'>2030</option>";
year_value  += "<option value='2029'>2029</option>";
year_value  += "<option value='2028'>2028</option>";
year_value  += "<option value='2027'>2027</option>";
year_value  += "<option value='2026'>2026</option>";
year_value  += "<option value='2025'>2025</option>";
year_value  += "<option value='2024'>2024</option>";
year_value  += "<option value='2023'>2023</option>";
year_value  += "<option value='2022'>2022</option>";
year_value  += "<option value='2021'>2021</option>";
year_value  += "<option value='2020'>2020</option>";
year_value  += "<option value='2019'>2019</option>";
year_value  += "<option value='2018'>2018</option>";
year_value  += "<option value='2017'>2017</option>";
year_value  += "<option value='2016'>2016</option>";
year_value  += "<option value='2015'>2015</option>";
year_value  += "<option value='2014'>2014</option>";
year_value  += "<option value='2013'>2013</option>";
year_value  += "<option value='2012'>2012</option>";
year_value  += "<option value='2011'>2011</option>";
year_value  += "<option value='2010'>2010</option>";
year_value  += "<option value='2009'>2009</option>";
year_value  += "<option value='2008'>2008</option>";
year_value  += "<option value='2007'>2007</option>";
year_value  += "<option value='2006'>2006</option>";
year_value  += "<option value='2005' selected >2005</option>";
year_value  += "<option value='2004'>2004</option>";
year_value  += "<option value='2003'>2003</option>";
year_value  += "<option value='2002'>2002</option>";
year_value  += "<option value='2001'>2001</option>";
year_value  += "<option value='2000'>2000</option>";
year_value  += "<option value='1999'>1999</option>";
year_value  += "<option value='1998'>1998</option>";
year_value  += "<option value='1997'>1997</option>";
year_value  += "<option value='1996'>1996</option>";
year_value  += "<option value='1995'>1995</option>";
year_value  += "<option value='1994'>1994</option>";
year_value  += "<option value='1993'>1993</option>";
year_value  += "<option value='1992'>1992</option>";
year_value  += "<option value='1991'>1991</option>";
year_value  += "<option value='1990'>1990</option>";
year_value  += "<option value='1989'>1989</option>";
year_value  += "<option value='1988'>1988</option>";
year_value  += "<option value='1987'>1987</option>";
year_value  += "<option value='1986'>1986</option>";
year_value  += "<option value='1985'>1985</option>";
year_value  += "<option value='1984'>1984</option>";
year_value  += "<option value='1983'>1983</option>";
year_value  += "<option value='1982'>1982</option>";
year_value  += "<option value='1981'>1981</option>";
year_value  += "<option value='1980'>1980</option>";
year_value  += "<option value='1982'>1982</option>";
year_value  += "<option value='1981'>1981</option>";
year_value  += "<option value='1980'>1980</option>";
year_value  += "<option value='1979'>1979</option>";
year_value  += "<option value='1978'>1978</option>";
year_value  += "<option value='1977'>1977</option>";
year_value  += "<option value='1976'>1976</option>";
year_value  += "<option value='1975'>1975</option>";
year_value  += "<option value='1974'>1974</option>";
year_value  += "<option value='1973'>1973</option>";
year_value  += "<option value='1972'>1972</option>";
year_value  += "<option value='1971'>1971</option>";
year_value  += "<option value='1970'>1970</option>";
year_value  += "<option value='1969'>1969</option>";
year_value  += "<option value='1968'>1968</option>";
year_value  += "<option value='1967'>1967</option>";
year_value  += "<option value='1966'>1966</option>";
year_value  += "<option value='1965'>1965</option>";
year_value  += "<option value='1964'>1964</option>";
year_value  += "<option value='1963'>1963</option>";
year_value  += "<option value='1962'>1962</option>";
year_value  += "<option value='1961'>1961</option>";
year_value  += "<option value='1960'>1960</option>";
year_value  += "<option value='1959'>1959</option>";
year_value  += "<option value='1958'>1958</option>";
year_value  += "<option value='1957'>1957</option>";
year_value  += "<option value='1956'>1956</option>";
year_value  += "<option value='1955'>1955</option>";
year_value  += "<option value='1954'>1954</option>";
year_value  += "<option value='1953'>1953</option>";
year_value  += "<option value='1952'>1952</option>";
year_value  += "<option value='1951'>1951</option>";
year_value  += "<option value='1950'>1950</option>";
year_value  += "<option value='1949'>1949</option>";
year_value  += "<option value='1948'>1948</option>";
year_value  += "<option value='1947'>1947</option>";
year_value  += "<option value='1946'>1946</option>";
year_value  += "<option value='1945'>1945</option>";
year_value  += "<option value='1944'>1944</option>";
year_value  += "<option value='1943'>1943</option>";
year_value  += "<option value='1942'>1942</option>";
year_value  += "<option value='1941'>1941</option>";
year_value  += "<option value='1940'>1940</option>";
year_value  += "<option value='1939'>1939</option>";
year_value  += "<option value='1938'>1938</option>";
year_value  += "<option value='1937'>1937</option>";
year_value  += "<option value='1936'>1936</option>";
year_value  += "<option value='1935'>1935</option>";
year_value  += "<option value='1934'>1934</option>";
year_value  += "<option value='1933'>1933</option>";
year_value  += "<option value='1932'>1932</option>";
year_value  += "<option value='1931'>1931</option>";
year_value  += "<option value='1930'>1930</option>";
year_value  += "<option value='1929'>1929</option>";
year_value  += "<option value='1928'>1928</option>";
year_value  += "<option value='1927'>1927</option>";
year_value  += "<option value='1926'>1926</option>";
year_value  += "<option value='1925'>1925</option>";
year_value  += "<option value='1924'>1924</option>";
year_value  += "<option value='1923'>1923</option>";
year_value  += "<option value='1922'>1922</option>";
year_value  += "<option value='1921'>1921</option>";
year_value  += "<option value='1920'>1920</option>";
year_value  += "<option value='1919'>1919</option>";
year_value  += "<option value='1918'>1918</option>";
year_value  += "<option value='1917'>1917</option>";
year_value  += "<option value='1916'>1916</option>";
year_value  += "<option value='1915'>1915</option>";
year_value  += "<option value='1914'>1914</option>";
year_value  += "<option value='1913'>1913</option>";
year_value  += "<option value='1912'>1912</option>";
year_value  += "<option value='1911'>1911</option>";
year_value  += "<option value='1910'>1910</option>";
year_value  += "<option value='1909'>1909</option>";
year_value  += "<option value='1908'>1908</option>";
year_value  += "<option value='1907'>1907</option>";
year_value  += "<option value='1906'>1906</option>";
year_value  += "<option value='1905'>1905</option>";
year_value  += "<option value='1904'>1904</option>";
year_value  += "<option value='1903'>1903</option>";
year_value  += "<option value='1902'>1902</option>";
year_value  += "<option value='1901'>1901</option>";
year_value  += "<option value='1900'>1900</option>";
year_value  += "</select>";

document.write(year_value);

}
//___________________________________from year.js end _________________


//___________________________________from feedback.js  _________________
// JavaScript Document for MOEWOE
//feedback_view.php,login.php
function getNext(aa) 
{ 
 document.getElementById("record_start").value = aa ; 
 document.form0.submit(); 
}
function getNextTender(ama) 
{ 
// document.getElementById("record_start").value = aa ; 
//alert(location.search+'sr=' +ama)

 location.search ='eid=9&sr=' +ama ;
// alert(location.protocol+"//"+location.host+ location.pathname+location.search+location.hash); // 
} 
 

function trim_it(string_txt)
{
elem = string_txt ; ///document.getElementById(filename) ;
 while(elem.charAt(0)==' ')// Ltrim
	{
	elem = elem.substring(1,elem.length);
	}
 while(elem.charAt(elem.length - 1)==' ') // rtrim
	{
	elem = elem.substring(0,elem.length - 1);
	}
 return elem ;

}//fnc trim_it
function ss(nn) //show
{
	spn  = "span_"+nn;
	hid = "sp_hid_"+nn
	document.getElementById(spn).innerHTML = document.getElementById(hid).value;
}
function hh(nn) //hide
{
	spn  = "span_"+nn;
	hid = "sp_hid_"+nn
	document.getElementById(spn).innerHTML = "";
}

// provide id in each element ,
//<input type="submit" name="Submit" value="Submit" onClick="return validate()">
//	<input type="hidden" name="valid_hid" id="valid_hid" value="name:Your Name,email:Your E-mail address,feedback: Your Feedback please!,title:pls title">

function validate(hid)//form_string
{
var myfeedbackarray = new Array();

form_string = document.getElementById(hid).value;//alert(form_string)
myfeedbackarray = form_string.split(",");
counted = myfeedbackarray.length ;
for(i = 0; i < counted ; i++) 
{
 narr = myfeedbackarray[i].split(":");
 //presentElement = eval("document.getElementById('" + myfeedbackarray[ i ] +"')" );
 
 presentElementName =  trim_it(narr[0]);//alert("--- "+presentElementName)
 presentElement = document.getElementById(presentElementName);
 //  presentElement = eval("document.getElementById('" + presentElementName +"')" );
presentElementvalue = presentElement.type == 'select-one'  ? presentElement.options[presentElement.selectedIndex].value :presentElement.value ;
	//alert(presentElementvalue) ;
	if(presentElementvalue == "" ) //	if(presentElement.value == "")
	//if(trim_it(presentElement.value == "") )
	{
		alert(narr[1]);
		
		if(narr[2])//getFocus ?
		{ //alert(narr[2]);
			if(narr[2] == "1")
			{
			 presentElement.focus();
		//presentElement.type == 'select-one'  ? presentElement.focus() :presentElement.focus()
			}
		}	//getFocus ?		
		return false;	
	}
	//_____________________E-Mail ______________________________
	if(presentElementName == "email" & presentElement.value != "" )
	{
	//--------------------------------
	  dv = presentElement.value ;
			
	  if((dv.indexOf('www.', 0) >= 0) || (dv.indexOf(':', 0) >= 0) || (dv.indexOf(';', 0) >= 0) ||(dv.indexOf('<', 0) >= 0) ||(dv.indexOf('>', 0) >= 0) || (dv.indexOf('\\', 0) >= 0) ||(dv.indexOf(',', 0) >= 0) ||(dv.indexOf(' ', 0) >= 0) ||(dv.indexOf('/', 0) >= 0) || (dv.indexOf('@', 0) == -1) || (dv.indexOf('.', 0) == -1)) 
	 {
				alert("Invalid e-mail! Please mention one valid Email");
				presentElement.focus();
				return false;
	 }//if((dv.indexOf
			//}


	//--------------------------------
     }//if(narr[0] == "email" & presentElement.value != "" )
	//_____________________E-Mail  end______________________________
     

}


//vl_name = document.getElementById("name").value ;
//vl_location = document.getElementById("location").value ;
//vl_email = document.getElementById("email").value ;
//vl_address = document.getElementById("address").value ;
//vl_feedback = document.getElementById("feedback").value ;

return true;

}//validate(form_string)
/*
function validateOLD(form_string)
{
var myfeedbackarray = new Array();
myfeedbackarray = form_string.split(",");
counted = myfeedbackarray.length;
for(i = 0; i < counted ; i++)
{
 presentElement = eval("document.getElementById('" + myfeedbackarray[ i ] +"')" );
	if(presentElement.value == "" )
	{
	alert("please give "+ myfeedbackarray[ i ]);
	presentElement.focus();
	return false;
	
	}


}


//vl_name = document.getElementById("name").value ;
//vl_location = document.getElementById("location").value ;
//vl_email = document.getElementById("email").value ;
//vl_address = document.getElementById("address").value ;
//vl_feedback = document.getElementById("feedback").value ;

return true;

}
/*
function validate(form_string)
{
//alert(form_string);
var myfeedbackarray = new Array();
myfeedbackarray = form_string.split(",");
counted = myfeedbackarray.length;
//alert(counted);
for(i = 0; i < counted ; i++)
{
 presentElement = eval("document.getElementById('" + myfeedbackarray[ i ] +"')" );
 //alert(i);
 //alert(presentElement);
// return false;
	if(presentElement.value == "" )
	{
	alert("please give " + myfeedbackarray[ i ]);
	presentElement.focus();
	return false;
	
	}


}
return true;

}
*/
//___________________________________from feedback.js end _________________

function hid_val_chng(srs,destin,hid)
{
//alphabets &#2494;&#2497;&#2498;&#2495;&#2496;&#2499;&#2503;&#2504;&#2519;

//document.getElementById(srs).value;
hidvalue  = document.getElementById(srs).options[document.getElementById(srs).selectedIndex].text;
alert(hidvalue + hidvalue.length)
document.getElementById(hid).value = hidvalue ;


//alert(document.getElementById(hid).value)
///document.getElementById(destin).innerHTML  = document.getElementById(hid).value;

destin_array = destin.split(",");
counted = destin_array.length ;
	for(i = 0; i < counted ; i++) 
	{
	document.getElementById(destin_array[i]).innerHTML  = document.getElementById(hid).value;
	
	}//for
}//fnc
//-----------------------------------------------------------------------------------------------------------------
		   function setVL(hf,actType)//getting data from hidden value, splitting and pasting to search fields //used in death_notice_view.phps//setVL('row$search_num','show')
		   {
		    hfVal = document.getElementById(hf).value ; 
		    splitArray = hfVal.split(",") ;
		    document.getElementById("deathPersonName").value   = splitArray[0] ;
		   // alert(splitArray[1])
			document.getElementById("embassyId").selectedIndex = splitArray[1] ;
		    document.getElementById("deathDate").value              = splitArray[2] ;
		    document.getElementById("passportNumber").value     = splitArray[3] ;
			document.getElementById("should_show").value          =  "y"  ;
			//alert(document.getElementById("should_show").value)
			document.getElementById("deathNoticeSearchForm").submit() ;
		   
		   }//function setVL()
//-----------------------------------------------------------------------------------------------------------------
function selectEvent(tp,eid)//onload="selectEvent('<?PHP echo $_REQUEST['actype']  . "','" .$_REQUEST['eid']  ; ?>')"
{
elementt = tp == "add" ? "srceventName" : "" ; //tp == "edit" ?   ;

document.getElementById(elementt).selectedIndex = eid
alert(elementt + document.getElementById(elementt).selectedIndex)
}//function selectEvent()
//-----------------------------------------------------------------------------------------------------------------
function doc_lastModifiedBDTIME(dt_val)//dtl = document.lastModified;acxs =  doc_lastModifiedBDTIME(dtl);document.write(acxs)
{
dt_brk = dt_val.split(" ");
dt_brk_prt = dt_brk[0].split("/")
new_string = dt_brk_prt[1] +"-"+dt_brk_prt[0] + "-"+ dt_brk_prt[2] + "  "+dt_brk[1]
return new_string ;
}
//-----------------------------------------------------------------------------------------------------------------
 function printerFriendlyVersion(nwindowRef, nwindowName,printableObjectContent, printableObject ) 
 { // printerFriendlyVersion('', '','contentTd', 'eventDescription' ) ;


 var nw ;
//as the contentTd is not available if(document.getElementById(printableObjectContent)){ //contentTd'
   //if(nw) { alert(nw.document.body.innerHTML); nw.close(); }

   cs = "<script language='JavaScript' src='../js/general.js'><\/script>\n<link rel='stylesheet' type='text/css' href='../css/general.css' >\n" ; 
  // alert(document.getElementById(printableObject))
   ItmTitleVL = "" ;
   //alert(document.getElementById("ItmTitle").value)
  // if(document.getElementById("ItmTitle"))
   //{ //used in events
 ItmTitleVL = "<strong>" + document.getElementById("ItmTitle").innerHTML  + "</strong><br><br>" ;
//   }//if(document.getElementById("ItmTitle") )
   
   //newDocContent = cs + ItmTitleVL +  document.getElementById(printableObject).innerHTML ;
   newDocContent = cs +  document.getElementById(printableObject).innerHTML ;

   alert("Please Wait . \n \n A new window is coming ..... ");
   nw=window.open('','nw1','');
   if(!nw){
          confirmed =	confirm('New Window was blocked\n\nOpen on the same Window ? ') ;
		  if(confirmed){ nw=window.open('','_self','') ; } else{  return ; } 
		    }//if(!nw)
   nw.document.write(newDocContent); //'eventDescription'
   nw.document.close();nw.focus();nw.print();
//as the contentTd is not available   }
 }//func printerFriendlyVersion(windowRef, windowName, printableObject ) 
 //-----------------------------------------------------------------------------------------------------------------
		   function setVLALL(hf,actType)//getting data from hidden value, splitting and pasting to search fields //used in death_notice_view.phps//setVL('row$search_num','show')
		   {
		    hfVal = document.getElementById(hf).value ; 
		    splitArray = hfVal.split(",") ;
		    //alert(splitArray[0])
			document.getElementById("jobTitle").selectedIndex = splitArray[0] ;
			////textselect(splitArray[0], 'job_cat'); 

		    textselect(splitArray[1], 'country');
			
			//document.getElementById("country").selectedIndex = splitArray[1] ;
		    document.getElementById("lastDate0").value  = splitArray[2] ;
		    document.getElementById("salary").value      =  splitArray[3] ;
			document.getElementById("should_show").value =  "y"  ;
			//alert(document.getElementById("should_show").value)
			//document.getElementById("JobSearchForm").submit() ;
			document.getElementById("form0").submit() ;
		   
		   }//function setVL()
function textselect(src1, src2)
{
src1val = src1 ; //document.getElementById(src1).value ;
src1val2LC = trim_it(src1val.toLowerCase()) ;//alert()
total_options = document.getElementById(src2).length ;
	for(gg = 0; gg < total_options ; gg++ )
	{
	src2text = document.getElementById(src2).options[gg].text ;
	src2text = src2text.toLowerCase();
		if(src2text == src1val2LC)
		{
			//alert(src1val +" already Exists ! \nPlease change the name ");
			document.getElementById(src2).options[gg].selected = true ;
			//document.getElementById(src1).value = ""; 
			break;
		}
		//alert(gg + src2text);
	}//for


}//fnc
//________________________________

function clearAllFields (vall)
//clearAllFields ("a,b,c:i##d,e,f:s##g,h,i:c")
{ 
//input = i, checkbox = c , radio = r, select = s 
valls =  vall.split("##");
count_valls = valls.length ;
	for(i=0; i<count_valls ; i++)
	{
	  fld_type = valls[i].split(":");
	  fld_names = fld_type[0].split(",") ;
	   count_fld_names	=  fld_names.length ;
	   for(ii=0; ii<count_fld_names ; ii++)
	   {
			 if(fld_type[1] == "i")
			{
			   document.getElementById(fld_names[ii]).value = "" ;
			   //alert(fld_names[ii])
			}
			 else if(fld_type[1] == "s")
			{
			   document.getElementById(fld_names[ii]).selectedIndex = 0 ;
			   //alert(fld_names[ii]) 
			}
	   }
	  
	  
	}

}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++

function DDtoDay(inputDate)
{
  var dateString = new Array('','st','nd','rd','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','st','nd','rd','th','th','th','th','th','th','th','st');
  returnDate = '';
  tempDate = parseInt(inputDate);
  if (tempDate >= 1 && tempDate <= 31)
  {
	  returnDate = inputDate + dateString[tempDate];
	}
	return returnDate;
} //DDtoDay(inputDate)

function jsDate()
{
newDate = new Date();
  var monthString = new Array('January','February','March' , 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , 'October' , 'November' , 'December');
//return DDtoDay(newDate.getDate())+" "+monthString [newDate.getMonth()] +" "+ newDate.getFullYear() +" "+ newDate.getHours() +":"+ newDate.getMinutes() +":"+ newDate.getSeconds()   ;
return newDate.getDate()+"."+ (newDate.getMonth() +1) +"."+ newDate.getFullYear() +" "+ newDate.getHours() +":"+ newDate.getMinutes() +":"+ newDate.getSeconds()   ;

//document.write(newDate+"<br>"+DDtoDay(newDate.getDate())+" "+monthString [newDate.getMonth()] +" "+ newDate.getFullYear() +" "+ newDate.getHours() +":"+ newDate.getMinutes() +":"+ newDate.getSeconds() +"<br> "+ newDate.toGMTString()   )
}//jsDate()

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function toBNGDateT(str,htmltype)
	{
		/*ctlToPlaceValue.value = chngBng(abcs)  ;
		&#2534;&#13;&#10;&#2535;&#32;&#13;&#10;&#2536;&#13;&#10;&#2537;&#13;&#10;&#2538;&#13;&#10;
		&#2539;&#13;&#10;&#2540;&#13;&#10;&#2541;&#13;&#10;&#2542;&#13;&#10;
		&#2543;&#13;&#10;
		// [ 0-9 = 48-57] -./ = &#45; &#46; &#47;
		*/
		bngArrT = new Array(10);
		/*
		
		bngArrT[45] = "&#45;" ; // -
		bngArrT[46] = "&#46;" ; // .
		bngArrT[47] = "&#47;" ; // /
		bngArrT[48] = "&#2534;" ; // 0
		bngArrT[49] = "&#2535;" ;
		bngArrT[50] = "&#2536;" ;
		bngArrT[51] = "&#2537;" ;
		bngArrT[52] = "&#2538;" ;
		bngArrT[53] = "&#2539;" ;
		bngArrT[54] = "&#2540;" ;
		bngArrT[55] = "&#2541;" ;
		bngArrT[56] = "&#2542;" ;
		bngArrT[57] = "&#2543;" ; // 9
		*/
		
		bngArrT[32] = "32" ; // space
		bngArrT[58] = "58" ; // :
		bngArrT[46] = "46" ; // .
		bngArrT[47] = "47" ; // /
		
		bngArrT[48] = "2534" ; // 0
		bngArrT[49] = "2535" ;
		bngArrT[50] = "2536" ;
		bngArrT[51] = "2537" ;
		bngArrT[52] = "2538" ;
		bngArrT[53] = "2539" ;
		bngArrT[54] = "2540" ;
		bngArrT[55] = "2541" ;
		bngArrT[56] = "2542" ;
		bngArrT[57] = "2543" ; // 9
		//alert('g') ;
		
		getEle_valoT = str;
		getEle_val_count = getEle_valoT.length
		var cCStringT = "" ;
		for(kkg = 0; kkg < getEle_val_count; kkg++)
		{
		cCatoT = getEle_valoT.charCodeAt(kkg);//alert("cCat "+cCat)
		//getkeycode =   retKeyCode(cCato);//alert("getkeycode "+getkeycode)//return
		getkeycodeT =   bngArrT[cCatoT];//alert("getkeycode "+getkeycode)//return
		 newValT = getkeycodeT != "" ? (getkeycodeT != "-" ? parseInt(getkeycodeT) :  "" ): cCatoT ; //alert("newVal "+newVal)
		 //newValT = getkeycodeT != "" ? (getkeycodeT != "-" ? parseInt(getkeycodeT) :  "" ): cCatoT ; //alert("newVal "+newVal)
		 cCString0T = newValT != "" ? String.fromCharCode(newValT) : "cCatoT" ;
		 cCString0T = htmltype == 'htmltype' ? "&#"+cCString0T+";" : cCString0T ; // html or number
		//0newVal = getkeycode != "" ?  getkeycode  : cCato ; //alert("newVal "+newVal)
		//0cCString0 = newVal != "" ? newVal : "" ;
		cCStringT = cCStringT + cCString0T;//alert("cCString "+cCString)
		
		//cCString = cCString + String.fromCharCode(bcb[cCat]);//
		
        }//for
//alert(cCString)
     return cCStringT ;   

	}
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++