// JavaScript Document

var old_opened2="";

var active="";

function ShowOption(list){

	var value= list.value;

	if(value == "0"){

		hideInContainer(false);

		return;

	}

	hideInContainer(true);

	var div2show=document.getElementById('Cat'+value);

	div2show.style.display='';	

}

function hideInContainer(hide)

{

	var cont = MM_findObj("main_container");

	for(var i=0;i<cont.childNodes.length;i++){

		if(cont.childNodes[i].tagName== "DIV"){

			cont.childNodes[i].style.display = hide ? "none" : "block";

		}

	}

}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

function MM_showHideLayers() { //v6.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }

	obj.visibility=v; }

}

function AutoPreload(){

	MM_preloadImages('images/about-on.gif','images/consultations-on.gif','images/regulations-on.gif','images/decisions-on.gif','images/licensing-on.gif','images/market-on.gif','images/publications-on.gif','images/info-on.gif','images/type-on.gif','images/numbering-on.gif','images/spectrum-on.gif')

	}

function Light(img,light){

	if(light)

	document.getElementById('M'+img).src="images/M"+img+"On.gif";

	else

	document.getElementById('M'+img).src="images/M"+img+".gif";

	}

function ShowHideHighights(){

	var h_icon=document.getElementById('H_Icon');

	var h_holder=document.getElementById('H_Holder');

	var h_tohide=document.getElementById('H_HolderToHide');

	if(h_tohide.style.display==''){

	h_icon.src="images/plus.gif";

	h_holder.className="HolderClosed";

	h_tohide.style.display="none";

	}

	else{

	h_icon.src="images/minus.gif";

	h_holder.className="HolderOpened";

	h_icon.onmouseover="alert('hi')";

	h_tohide.style.display="";

	}

	}

function ShowHideNews(){

	var newsicon=document.getElementById('NewsIcon');

	var holder=document.getElementById('Holder');

	var tohide=document.getElementById('HolderToHide');

	if(tohide.style.display==''){

	newsicon.src="images/plus.gif";

	holder.className="HolderClosed";

	tohide.style.display="none";

	}

	else{

	newsicon.src="images/minus.gif";

	holder.className="HolderOpened";

	tohide.style.display="";

	}

	}

function ShowContent(x){

	var button=document.getElementById('M'+x);

	var holdercontents=document.getElementById('HolderSwf');

	button.src="images/M"+x+"on.gif";

	holdercontents.innerHTML="";

	holdercontents.className="HolderSwf1";

	}

	var old_opened = "";

var opened_div = "";

function ShowSub(x){

	var spacer=document.getElementById('Spacer'+x);

	var submenu=document.getElementById('Submenu'+x);

	var arrow=document.getElementById('haschildren'+x);

	if(submenu.style.display=='none'){

		submenu.style.display='';

		spacer.style.display='none';

		arrow.src="images/child.gif";

	} else {


		if(old_opened != "") {

		   old_opened.style.display = "none";	

		}

		submenu.style.display='none';

		spacer.style.display='';

		arrow.src="images/child2.gif";

	}

	old_opened = submenu;

}	

var old_opened2 = "";

var opened_div2 = "";

function ShowSub2(x){

	var submenu=document.getElementById('Submenu'+x);

	var arrow=document.getElementById('haschildren'+x);

		

	if(submenu.style.display=='none'){

		submenu.style.display='';

		arrow.src="images/child.gif";

		

	} else {

		if(old_opened != "") {

		   old_opened.style.display = "none";	

		}

		submenu.style.display='none';

		arrow.src="images/child2.gif";

	}

old_opened2 = submenu;

}	

var Subold_opened = "";

var Subopened_div = "";

function ShowSubSub(x){

	var submenu=document.getElementById('SubSubmenu'+x);

	if(x && Subold_opened != "") {

		   Subold_opened.style.display = "none";	

		}

	if(submenu.style.display=='none'){

		submenu.style.display='';

		}

		else{

		submenu.style.display='none';

		}

	if(x) {

		Subold_opened = submenu;

		}

		 Subopened_div = submenu;

	}	

var fontVariation=2;

var minFontSize=12;

var maxFontSize=14;

function enlargeFont(bigger)

{

var elements=document.getElementById('Text2Enlarge');

	var newFontSize="";

		newFontSize=elements.style.fontSize;

		if(newFontSize=="")

			newFontSize=minFontSize;

			newFontSize=parseInt(newFontSize);

		if(bigger)

			newFontSize=(newFontSize<maxFontSize)?(newFontSize+fontVariation):(maxFontSize);

		else

			newFontSize=(newFontSize>minFontSize)?(newFontSize-fontVariation):(newFontSize);

		

	elements.style.fontSize=newFontSize+'px';

}

var fontVariationAr=2;

var minFontSizeAr=13;

var maxFontSizeAr=15;

function enlargeFontAr(bigger)

{

var elements=document.getElementById('Text2Enlarge');

	var newFontSize="";

		newFontSize=elements.style.fontSize;

		if(newFontSize=="")

			newFontSize=minFontSizeAr;

			newFontSize=parseInt(newFontSize);

		if(bigger)

			newFontSize=(newFontSize<maxFontSizeAr)?(newFontSize+fontVariationAr):(maxFontSizeAr);

		else

			newFontSize=(newFontSize>minFontSizeAr)?(newFontSize-fontVariationAr):(newFontSize);

		

	elements.style.fontSize=newFontSize+'px';

}

function print_function()

{ 

	var disp_setting="toolbar=no,location=no,directories=no,menubar=no,";

		disp_setting+="scrollbars=yes,width=600, height=500, left=100, top=100";

	var content_vlue = document.getElementById("Text").innerHTML;



	var docprint=window.open("","",disp_setting);



	docprint.document.open();

	docprint.document.write('<html><head><title> TRA - Telecommunications Regulatory Authority </title>');

	docprint.document.write('<link rel="stylesheet" href="css/styles.css">');

	docprint.document.write('</head><body onLoad="self.print(); self.close();" style="margin:0px;padding:0px;background-color:ffffff;" >');

	docprint.document.write('<div class="Text"><span class="FloatLeft"><img src="images/logo2.gif" alt=""></span><span class="FloatRight" style="padding-top:12px;padding-right:12px;"><a href="window.close();">close</a></span></div>');

	docprint.document.write('<div style="clear:both;color:#39374c;font-family:arial;font-size:12px;">'+content_vlue+'</div>');

	docprint.document.write('</body></html>');

	docprint.document.close(); 

	docprint.focus();

}

function print_functionar()

{ 

	var disp_setting="toolbar=no,location=no,directories=no,menubar=no,";

		disp_setting+="scrollbars=yes,width=600, height=500, left=100, top=100";

	var content_vlue = document.getElementById("Text").innerHTML;

	var docprint=window.open("","",disp_setting);

	docprint.document.open();

	docprint.document.write('<html><head><title> TRA - Telecommunications Regulatory Authority--- </title>');

	docprint.document.write('<link rel="stylesheet" href="css/stylesar.css">');

	docprint.document.write('</head><body onLoad="self.print(); self.close();" style="margin:0px;padding:0px;background-color:ffffff;" >');

	docprint.document.write('<div class="Text"><span class="FloatLeft"><img src="images/logo2.gif" alt=""></span><span class="FloatRight" style="padding-top:12px;padding-right:12px;"><a href="window.close();">close</a></span></div>');

	docprint.document.write('<div style="clear:both;color:#39374c;font-family:arial;font-size:12px;">'+content_vlue+'</div>');

	docprint.document.write('</body></html>');

	docprint.document.close(); 

	docprint.focus();

}

function ShowFaq(x){

	var answer=document.getElementById("Faq"+x);

	if(answer.style.display=='none'){

		answer.style.display='';

		}

		else{

		answer.style.display='none';

		}

	}

function ShowPoll(x){

	var answer=document.getElementById("Poll"+x);

	if(answer.style.display=='none'){

		answer.style.display='';

		}

		else{

		answer.style.display='none';

		}

	}

function P7_Snap() { //v2.63 by PVII

 var x,y,ox,bx,oy,p,tx,a,b,k,d,da,e,el,tw,q0,xx,yy,w1,pa='px',args=P7_Snap.arguments;a=parseInt(a);

 if(document.layers||window.opera){pa='';}for(k=0;k<(args.length);k+=4){

 if((g=MM_findObj(args[k]))!=null){if((el=MM_findObj(args[k+1]))!=null){

 a=parseInt(args[k+2]);b=parseInt(args[k+3]);x=0;y=0;ox=0;oy=0;p="";tx=1;

 da="document.all['"+args[k]+"']";if(document.getElementById){

 d="document.getElementsByName('"+args[k]+"')[0]";if(!eval(d)){

 d="document.getElementById('"+args[k]+"')";if(!eval(d)){d=da;}}

 }else if(document.all){d=da;}if(document.all||document.getElementById){while(tx==1){

 p+=".offsetParent";if(eval(d+p)){x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));

 }else{tx=0;}}ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);tw=x+ox+y+oy;

 if(tw==0||(navigator.appVersion.indexOf("MSIE 4")>-1&&navigator.appVersion.indexOf("Mac")>-1)){

  ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top);}else{

  w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;

  x=document.body.scrollLeft+event.clientX+bx;y=document.body.scrollTop+event.clientY;}}

 }else if(document.layers){x=g.x;y=g.y;q0=document.layers,dd="";for(var s=0;s<q0.length;s++){

  dd='document.'+q0[s].name;if(eval(dd+'.document.'+args[k])){x+=eval(dd+'.left');y+=eval(dd+'.top');

  break;}}}e=(document.layers)?el:el.style;xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);

 if(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1){

  xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);}

 e.left=xx+pa;e.top=yy+pa;}}}

}

function HideAll(){

MM_showHideLayers('HideAll','','hide','sub1','','hide','sub2','','hide','sub3','','hide');

}

function IsValidEmailAddress(txt){

	if(txt.value !=""){ 

		var goodEmail = txt.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);

		if (goodEmail){

			return true;

		} else {

			return false;

		}

	}

}

var opened_job = "";

function ShowJob(x){

	document.getElementById('hdJobID').value=x;

	var cont = MM_findObj("Job"+x);

	var form = MM_findObj("selected_job");

	if(opened_job == "") opened_job = form;

	

	if(cont.style.display=="block"){ 

		cont.style.display = "none";

		} else {

			cont.style.display = "block";

		}

	cont.innerHTML=opened_job.innerHTML;

	

	if(cont != opened_job){

		opened_job.innerHTML = "";

		opened_job.style.display = "none";

	}

	opened_job = cont;

}

function IsStringValid(str,msg) 

	{ 

	var invalidChars = '1234567890/*-++_)(*&^%$#@!~"\':;/?.><{}][~`=';

	  for (i = 0; i < invalidChars.length; i++) { 

		if (str.value.indexOf(invalidChars.charAt(i)) > -1) { 

		alert(msg)

		str.focus();

		  return false; 

		} 

	  } 

	  return true; 

} 

function ValidateJoinForm(){

	var msg="";

	var msg1="";

	if (document.Form1.txtEmail.value==""){

		msg+=" - Email \n";

	}

	 else{

	if (IsValidEmailAddress(document.Form1.txtEmail)==false)

		msg1="- Invalid email address \n"}

	if (document.Form1.txtFirstName.value=="")

		msg+=" - First Name \n"

	if (document.Form1.txtLastName.value=="")

		msg+=" - Last Name \n"	

	if (CheckGender()==false)

		 msg+=" - Gender \n"

	if (document.getElementById('lstCountry').value=="-1")

	{

		msg+=" - Country\n"

	}

	if (document.getElementById('txtCity').value=="")

	{

		msg+=" - City\n"

	}

	if (document.Form1.txtAddress.value=="")

		msg+=" - Address \n"

	if (document.Form1.txtTel.value=="")

		{

		msg+=" - Phone \n"

		}

		else

		{

		if (isNaN(parseInt(document.Form1.txtTel.value)))

		  msg+=" - Invalid Phone Number \n"

		} 

	 if (document.Form1.txtProfession.value=="")

		msg+=" - Profession \n"	

	if (document.Form1.txtCompany.value=="")

		msg+=" - Company \n"

	if (document.getElementById('txtPosition').value=="")

		msg+=" - Position \n"

	if (msg==""){

		if (msg1=="")

		   return true

		else

		{

			alert(msg1);

			return false;}

	}

	else{  

	   alert("Please check the following and submit again:\n" + msg )

		return false;

		}

	}

	function CheckGender(){

   var check=false;

   var i=0;

   

   for (i=0;i<document.Form1.rdGender.length;i++){

	   if(document.Form1.rdGender[i].checked==true) 

	   check=true

   } 

  

   if (check==false)

	  return false;

   else

	  return true;

}

function ValidateUnsubscribe()

{

		 var msg;

		 var msg2;

		msg=""

	   msg2="";

	   if (document.getElementById('txtEmail').value=="")

		   msg +="- Email\n" 

	   else{

			 if (IsValidEmailAddress(document.getElementById('txtEmail'))==false)

			   msg2="- Invalid email address \n"}

	   if (document.getElementById('txtConfirm').value=="")

		   msg +="- Confirm Email\n" 

	   else{

			 if (IsValidEmailAddress(document.getElementById('txtConfirm'))==false)

			   msg2="- Invalid email address \n"

			 if (document.getElementById('txtConfirm').value!=document.getElementById('txtEmail').value)

				 msg2="- Please Retype the Email Correctly \n"}

	   if (msg!="")

		{

			msg="Please enter the following information:\n" + msg +msg2

			alert(msg);

			return false;

		}

		else{

			if (msg2==""){

			  return true;

			 }else{

			 alert(msg2);

			 return false;}

			}

	} 

function ShowEvent_old(){

	document.getElementById('EventHolder').style.display='block';

	P7_Snap('EventDate','EventHolder',-220,26);

}

function HideEvent_old(){

	document.getElementById('EventHolder').style.display='none';

}

function ShowEvent(EventDate,EventHolder){

	document.getElementById(EventHolder).style.display='block';

	P7_Snap(EventDate,EventHolder,20,20);

}

function HideEvent(EventHolder){

	document.getElementById(EventHolder).style.display='none';

}

var requiredVersion = 8;

var useRedirect = false;				  

var flashPage   = "flash.html"

var noFlashPage = "noflash.html"

var upgradePage = "upgrade.html"

var flash2Installed = false;

var flash3Installed = false;

var flash4Installed = false;

var flash5Installed = false;

var flash6Installed = false;

var flash7Installed = false;

var flash8Installed = false;

var flash9Installed = false;

var maxVersion = 9;  

var actualVersion = 0;

var hasRightVersion = false;

var jsVersion = 1.0;            

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;

var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;

jsVersion = 1.1;

if(isIE && isWin){

  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');

  document.write('on error resume next \n');

  document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');

  document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');

  document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');

  document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  

  document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  

  document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');

  document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');

  document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');

  document.write('<\/SCR' + 'IPT\> \n'); 

}

function detectFlash() {  

  if (navigator.plugins) {

	if (navigator.plugins["Shockwave Flash 2.0"]

		|| navigator.plugins["Shockwave Flash"]) {



	  var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";

	  var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;



	  var flashVersion = parseInt(flashDescription.substring(16));



	  flash2Installed = flashVersion == 2;    

	  flash3Installed = flashVersion == 3;

	  flash4Installed = flashVersion == 4;

	  flash5Installed = flashVersion == 5;

	  flash6Installed = flashVersion == 6;

	  flash7Installed = flashVersion == 7;

	  flash8Installed = flashVersion == 8;

	  flash9Installed = flashVersion >= 9;

	}

  }

  for (var i = 2; i <= maxVersion; i++) {  

	if (eval("flash" + i + "Installed") == true) actualVersion = i;

  }

  if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 4;  

  if (actualVersion >= requiredVersion) {

	if (useRedirect) {

	  if(jsVersion > 1.0) {

		window.location.replace(flashPage);  

	  } else {

		window.location = flashPage;

	  }

	}

	hasRightVersion = true;                

  } else {  

	if (useRedirect) {

	  if(jsVersion > 1.0) {

		window.location.replace((actualVersion >= 2) ? upgradePage : noFlashPage);

	  } else {

		window.location = (actualVersion >= 2) ? upgradePage : noFlashPage;

	  }

	}

  }

}

detectFlash();

function AC_AddExtension(src, ext)

{

  if (src.indexOf('?') != -1)

	return src.replace(/\?/, ext+'?'); 

  else

	return src + ext;

}

function AC_Generateobj(objAttrs, params, embedAttrs) 

{ 

  var str = '<object ';

  for (var i in objAttrs)

	str += i + '="' + objAttrs[i] + '" ';

  str += '>';

  for (var i in params)

	str += '<param name="' + i + '" value="' + params[i] + '" /> ';

  str += '<embed ';

  for (var i in embedAttrs)

	str += i + '="' + embedAttrs[i] + '" ';

  str += ' ></embed></object>';



  document.write(str);

}

function AC_FL_RunContent(){

  var ret = 

	AC_GetArgs

	(  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

	 , "application/x-shockwave-flash"

	);

  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);

}

function AC_SW_RunContent(){

  var ret = 

	AC_GetArgs

	(  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"

	 , null

	);

  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);

}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){

  var ret = new Object();

  ret.embedAttrs = new Object();

  ret.params = new Object();

  ret.objAttrs = new Object();

  for (var i=0; i < args.length; i=i+2){

	var currArg = args[i].toLowerCase();    

	switch (currArg){	

	  case "classid":

		break;

	  case "pluginspage":

		ret.embedAttrs[args[i]] = args[i+1];

		break;

	  case "src":

	  case "movie":	

		args[i+1] = AC_AddExtension(args[i+1], ext);

		ret.embedAttrs["src"] = args[i+1];

		ret.params[srcParamName] = args[i+1];

		break;

	  case "onafterupdate":

	  case "onbeforeupdate":

	  case "onblur":

	  case "oncellchange":

	  case "onclick":

	  case "ondblClick":

	  case "ondrag":

	  case "ondragend":

	  case "ondragenter":

	  case "ondragleave":

	  case "ondragover":

	  case "ondrop":

	  case "onfinish":

	  case "onfocus":

	  case "onhelp":

	  case "onmousedown":

	  case "onmouseup":

	  case "onmouseover":

	  case "onmousemove":

	  case "onmouseout":

	  case "onkeypress":

	  case "onkeydown":

	  case "onkeyup":

	  case "onload":

	  case "onlosecapture":

	  case "onpropertychange":

	  case "onreadystatechange":

	  case "onrowsdelete":

	  case "onrowenter":

	  case "onrowexit":

	  case "onrowsinserted":

	  case "onstart":

	  case "onscroll":

	  case "onbeforeeditfocus":

	  case "onactivate":

	  case "onbeforedeactivate":

	  case "ondeactivate":

	  case "type":

	  case "codebase":

		ret.objAttrs[args[i]] = args[i+1];

		break;

	  case "width":

	  case "height":

	  case "align":

	  case "vspace": 

	  case "hspace":

	  case "class":

	  case "title":

	  case "accesskey":

	  case "name":

	  case "id":

	  case "tabindex":

		ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];

		break;

	  default:

		ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];

	}

  }

  ret.objAttrs["classid"] = classid;

  if (mimeType) ret.embedAttrs["type"] = mimeType;

  return ret;

}

function validateSearch(){

		if (document.getElementById("txtSearch").value==""){

		alert("Please enter your keyword");

		return false;

		}

	else{

		return true;

		}

}

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

function ShowCommentBox(){

	var n=MM_findObj('CommentBox');

	n.style.display='';

	}

function HideCommentBox(){

	var n=MM_findObj('CommentBox');

	n.style.display='none';

	}

function ShowBig(bigpic)

{ 	

	var width="435", height="272";

	var n=MM_findObj('BigPhoto');

	n.innerHTML='<img src="ContentPhotos/Photos/'+bigpic+'" alt="" height='+height+' width='+width+'>';

}

function ClosePhotoGallery(){

	var n=MM_findObj('PhotoGallery');

	n.style.display='none';

	}

function Checkvote(btns, ItemsCount, lang)

{

	var i;

	var ItemChecked=false;

	i=0;

	for (i=0; i< ItemsCount;i++){

		if (document.getElementById(btns + "_" + i ).checked==true)

			ItemChecked=true

	}

	if (ItemChecked==true){

			return true;

	}

	else {

		alert("Please select an answer")

		return false;

	}

 }

 function handleKeyPress(e,btn){

	var key=e.keyCode || e.which;

	if (key==13){

		 e.returnValue=false; 

		 e.cancel = true; 

		  document.getElementById(btn).focus();

			document.getElementById(btn).click();

	}

}

function ValidateJoinFormar(){

	var msg="";

	var msg1="";

	if (document.Form1.txtEmail.value==""){

		msg+=" - 'D(1J/ 'D%DC*1HFJ \n";

	}

	 else{

	if (IsValidEmailAddress(document.Form1.txtEmail)==false)

		msg1="- 'D(1J/ 'D%DC*1HFJ :J1 5-J- \n"}

	if (document.Form1.txtFirstName.value=="")

		msg+=" - 'D%3E 'D'HD \n"

	if (document.Form1.txtLastName.value=="")

		msg+=" - 'D'3E 'D'.J1 \n"	

	if (CheckGender()==false)

		 msg+=" - 'D,F3 \n"

	if (document.getElementById('lstCountry').value=="-1")

	{

		msg+=" - 'D(D/\n"

	}

	if (document.getElementById('txtCity').value=="-1")

	{

		msg+=" - 'DE/JF)\n"

	}

	if (document.Form1.txtAddress.value=="")

		msg+=" - 'D9FH'F \n"

	if (document.Form1.txtTel.value=="")

		{

		msg+=" - 'DG'*A \n"

		}

		else

		{

		if (isNaN(parseInt(document.Form1.txtTel.value)))

		  msg+=" - 'DG'*A :J1 5-J- \n"

		} 

	 if (document.Form1.txtProfession.value=="")

		msg+=" - 'DEGF) \n"	

	if (document.Form1.txtCompany.value=="")

		msg+=" - 'D41C) \n"

	if (document.getElementById('txtPosition').value=="")

		msg+=" - 'DEF5( \n"

	if (msg==""){

		if (msg1=="")

		   return true

		else

		{

			alert(msg1);

			return false;}

	}

	else{  

	   alert("'D1,'! 'D*#C/ EF 'DE9DHE'* '/F'G H'DE-'HD) EF ,/J/:\n" + msg )

		return false;

		}

	}
function CheckInvalidChars()
		{
	var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";

  for (var i = 0; i < document.getElementById('ControlSearch1_txtSearch').value.length; i++) {
  	if (iChars.indexOf(document.getElementById('ControlSearch1_txtSearch').value.charAt(i)) != -1) 
  	{
  	alert("Containts special characters. \n These are not allowed.\n Please remove them and try again.");
  	return false;
  		}
	 }	
  		if (document.getElementById('ControlSearch1_txtSearch').value=='')
  		{
  		alert('Please provide a word for searching.');
  		return false;
  		}
	 }
	 
function CheckInvalidChars_ar()
		{
	var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";

  for (var i = 0; i < document.getElementById('ControlSearch1_txtSearch').value.length; i++) {
  	if (iChars.indexOf(document.getElementById('ControlSearch1_txtSearch').value.charAt(i)) != -1) 
  	{
  	alert("هناك رموز لا تسمح في البحت.الرجاء إزالتها وحاول مرة اخرى")
  	return false;
  		}
	 }	
	 if (document.getElementById('ControlSearch1_txtSearch').value=='')
  		{
  		alert('الرجاء إختيار كلمة البحث');
  		return false;
  		}
	 }
