﻿function MM_preloadImages(){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(){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){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(){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]}}dFeatures='dialogHeight: 300px; dialogWidth: 600px; center:yes;  status:no; screenX:400;screenY:400;  Left: 15px;scroll:yes';modalWin="";function xShowModalDialog(sURL,vArguments,sFeatures){window.open(sURL,vArguments,sFeatures)}function checkFocus(){if(window.navigator.appVersion.indexOf("MSIE")==-1){if(modalWin!=null&&!modalWin.closed){self.blur();modalWin.focus()}}}function MM_openBrWindow(sURL,vArguments,sFeatures){window.showModalDialog(sURL,vArguments,sFeatures)}function InitialFocus(control){document.getElementById[control].focus()}function EmptyTextBox(sText){if(sText.value.toLowerCase()=='isd'){sText.value=''}else if(sText.value.toLowerCase()=='std'){sText.value=''}else if(sText.value.toLowerCase()=='phone number'||sText.value.toLowerCase()=='mobile number'||sText.value.toLowerCase()=='fax number'){sText.value=''}sText.focus()}function IsNumericss(sText,Type){var ValidChars="0123456789";var IsNumber=true;var Char;var DynTxtName;var inputNumber;inputNumber=sText.value;if(sText.value.toLowerCase()==''){sText.value=Type;return}DynTxtName=sText.name;for(i=0;i<inputNumber.length&&IsNumber==true;i++){Char=inputNumber.charAt(i);if(ValidChars.indexOf(Char)==-1){IsNumber=false;alert('Enter Only Numbers..');document.getElementById(DynTxtName).select();document.getElementById(DynTxtName).focus();return false}}return true}function IsNumerics(sText){var ValidChars="0123456789";var IsNumber=true;var Char;var DynTxtName;var inputNumber;inputNumber=sText.value;DynTxtName=sText.name;for(i=0;i<inputNumber.length&&IsNumber==true;i++){Char=inputNumber.charAt(i);if(ValidChars.indexOf(Char)==-1){IsNumber=false;alert('Enter Only Numbers..');document.getElementById(DynTxtName).select();document.getElementById(DynTxtName).focus();return false}}return true}function WidthAndHeight(e,txtName){var code;var DynTxtName;if(!e)var e=window.event;if(e.keyCode)code=e.keyCode;else if(e.which)code=e.which;var character=String.fromCharCode(code);if((code>95&&code<106)||(code>47&&code<58)||code==8||code==46||(code>36&&code<41)||code==9||code==13){return true}else{return false}}function IsNumerics1(sText){var ValidChars="0123456789";var IsNumber=true;var Char;var DynTxtName;var inputNumber;inputNumber=sText.value;DynTxtName=sText.name;for(i=0;i<inputNumber.length&&IsNumber==true;i++){Char=inputNumber.charAt(i);if(ValidChars.indexOf(Char)==-1){IsNumber=false;alert('Enter Only Numbers..');document.getElementById(DynTxtName).select();document.getElementById(DynTxtName).focus()}}}function checkNumeric(objName){var ValidChars="0123456789";var IsNumber=true;var Char;var DynTxtName;var inputNumber;inputNumber=sText.value;DynTxtName=sText.name;for(i=0;i<inputNumber.length&&IsNumber==true;i++){Char=inputNumber.charAt(i);if(ValidChars.indexOf(Char)==-1){IsNumber=false;alert('Enter Only Number..');document.getElementById(DynTxtName).select();document.getElementById(DynTxtName).focus();break}}}var win=null;function NewWindow(mypage,myname,w,h,scroll,pos){if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100}if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100}else if((pos!="center"&&pos!="random")||pos==null){LeftPosition=0;TopPosition=20}settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';win=window.open(mypage,myname,settings)}function checkValidation(buttonName,e){var keycode;if(window.event)keycode=window.event.keyCode;else keycode=e.which;if(keycode==13){document.getElementById(buttonName).click();return false}}function EnterKey(e){var keycode;if(window.event)keycode=window.event.keyCode;else keycode=e.which;if(keycode==13){e.handled=false}}function TelephoneEnterKey(e,txtName){var code;var DynTxtName;if(!e)var e=window.event;if(e.keyCode)code=e.keyCode;else if(e.which)code=e.which;var character=String.fromCharCode(code);if((code>95&&code<106)||(code>47&&code<58)||code==8||code==46||(code>36&&code<41)||code==9||code==13){return true}else{return false}}function HeightWidthEnterKey(e,txtName){var code;var DynTxtName;if(!e)var e=window.event;if(e.keyCode)code=e.keyCode;else if(e.which)code=e.which;var character=String.fromCharCode(code);if((code>95&&code<106)||(code>47&&code<58)||code==8||code==46||(code>36&&code<41)||code==9||code==13){if((code==48||code==96)&&txtName==''){return false}return true}else{return false}}function Init(){iView.document.designMode='On'}function executeCommand(aName){iView.document.execCommand(aName,false,null);iView.focus()}function changeFont(fontType){if(fontType=='fontname'){var w=document.frmEditor.ddlFontName.selectedIndex;var selected_text=document.frmEditor.ddlFontName.options[w].text;iView.document.execCommand(fontType,false,selected_text);iView.focus()}if(fontType=='fontsize'){var w=document.frmEditor.ddlFontSize.selectedIndex;var selected_text=document.frmEditor.ddlFontSize.options[w].text;iView.document.execCommand(fontType,false,selected_text);iView.focus()}}function openFileDialog(){NewWindow('http://192.168.1.101/InsertImage.aspx','Upload Image','300','400','Yes','Center')}function closeDialog(){window.close();alert('Close Dialog Clicked')}function editor_insertHTML(objname,str1,str2,reqSel){var config=document.all[objname].config;var editor_obj=document.all["_"+objname+"_editor"];if(str1==null){str1=''}if(str2==null){str2=''}if(tagname=='iframe'){var editdoc=editor_obj.contentWindow.document;sRange=editdoc.selection.createRange();var sHtml=sRange.htmlText;if(sRange.length){return alert("Unable to insert HTML.  Try highlighting content instead of selecting it.")}var oldHandler=window.onerror;window.onerror=function(){alert("Unable to insert HTML for current selection.");return true;}
if(sHtml.length){if(str2){sRange.pasteHTML(str1+sHtml+str2)}else{sRange.pasteHTML(str1)}}else{if(reqSel){return alert("Unable to insert HTML.  You must select something first.")}sRange.pasteHTML(str1+str2)}window.onerror=oldHandler}sRange.collapse(false);sRange.select()}function openColorDialog1(objName){var retValue=showModalDialog('http://192.168.1.101/CustomColors.aspx','SelectColors','dialogHeight: 380px; dialogWidth: 245px; center: yes; scroll: No; help:  No; resizable: No; status:no;');var cntlName=document.getElementById(objName.id);document.getElementById(objName.id).style.backgroundcolor="red"}function insertHTML(html,n){var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer"){document.getElementById('wysiwyg'+n).contentWindow.document.selection.createRange().pasteHTML(html)}else{var div=document.getElementById('wysiwyg'+n).contentWindow.document.createElement("div");div.innerHTML=html;var node=insertNodeAtSelection(div,n)}}function ChangeTableProperites(paraValues,editorID){var tcolor;var retVal;alert('ChangeTableProperites');if(isTableSelected()||isCursorInTableCell()){}}function InsertTable(type){var valueRetreive;var cellColSpan,cellRowSpan,cellWidth,cellHeight,cellWrap,cellAlignment,cellVAlign,cellHAlign;var modTable="";var table1;var i,j;if(type=='Insert'){table1="<table";valueRetreive=document.getElementById('txtTableWidth').value;if(valueRetreive!=""){table1=table1+" width="+valueRetreive+document.getElementById('ddlTableWidth').value}else{table1=table1+" width=100% "}valueRetreive=document.getElementById('txtTableHeight').value;if(valueRetreive!=""){table1=table1+" height="+valueRetreive+document.getElementById('ddlTableHeight').value}valueRetreive=document.getElementById('ddlTableAlighment').value;if(valueRetreive!=""){if(valueRetreive=='0'){table1=table1+" align=center"}if(valueRetreive=='1'){table1=table1+" align=left"}if(valueRetreive=='2'){table1=table1+" align=right"}}valueRetreive=document.getElementById('txtTableBorderSize').value;if(valueRetreive!=""){table1=table1+" border ="+valueRetreive+"px"}valueRetreive=document.getElementById('txtTableCellPadding').value;if(valueRetreive!=""){table1=table1+" cellpadding="+valueRetreive+"px"}else{table1=table1+" cellpadding=0px"}valueRetreive=document.getElementById('txtTableCellSpacing').value;if(valueRetreive!=""){table1=table1+" cellspacing="+valueRetreive+"px"}else{table1=table1+" cellspacing=0px"}valueRetreive=document.getElementById('ddlTableBorderStyle').value;table1=table1+" style= border-style:"+valueRetreive+";";valueRetreive=document.getElementById('txtTableBackColor').value;if(valueRetreive!=''){table1=table1+" bgcolor="+valueRetreive+" "}valueRetreive=document.getElementById('txtTableBorderColor').value;if(valueRetreive!=''){table1=table1+" bordercolor="+valueRetreive+" "}table1=table1+">";if(document.getElementById('txtCellWidth').value!=''){cellWidth=document.getElementById('txtCellWidth').value+document.getElementById('ddlCellWidth').value}else{cellWidth="0px"}if(document.getElementById('txtCellHeight').value!=''){cellHeight=document.getElementById('txtCellHeight').value+document.getElementById('ddlCellHeight').value}else{cellHeight="0px"}cellRowSpan=document.getElementById('txtCellRowSpan').value;cellColSpan=document.getElementById('txtCellColumnSpan').value;cellVAlign=document.getElementById('ddlVAlign').value;cellHAlign=document.getElementById('ddlHAlign').value;if(document.getElementById('chkCellWrap').checked==true){cellWrap='nowrap'}else{cellWrap=''}var rowsc,cols;rowsc=document.getElementById('txtRows').value;cols=document.getElementById('txtColumns').value;if(rowsc==""||rowsc==0){rowsc=1}if(cols==""||cols==0){cols=1}for(i=0;i<rowsc;i++){table1=table1+"<tr>";for(j=0;j<cols;j++){if(cellWrap!=''){table1=table1+"<td rowspan = '"+cellRowSpan+"' colspan ='"+cellColSpan+"' noWrap='nowrap' style='width:"+cellWidth+";height:"+cellHeight+"' align='"+cellHAlign+"' valign='"+cellVAlign+"'>&nbsp;</td>"}else{table1=table1+"<td rowspan = '"+cellRowSpan+"' colspan ='"+cellColSpan+"' style='width:"+cellWidth+";height:"+cellHeight+"' align='"+cellHAlign+"' valign='"+cellVAlign+"'>&nbsp;</td>"}}table1=table1+"</tr>"}table1=table1+"</table>";window.close();window.opener.insertHTML(table1,qsParm['wysiwyg'])}if(type=='Modify'){if(document.getElementById('txtCellColumnSpan').value==''||document.getElementById('txtCellColumnSpan').value==''){alert('RowSpan Or ColumnSpan value cannot be Empty...');return}modTable=modTable+document.getElementById('txtTableBackColor').value+"$";if(document.getElementById('txtTableCellSpacing').value!=""){modTable=modTable+document.getElementById('txtTableCellSpacing').value+"$"}else{modTable=modTable+"0$"}if(document.getElementById('txtTableCellPadding').value!=""){modTable=modTable+document.getElementById('txtTableCellPadding').value+"$"}else{modTable=modTable+"0$"}modTable=modTable+document.getElementById('txtTableBorderSize').value+"$";if(document.getElementById('txtTableWidth').value!=""){modTable=modTable+document.getElementById('txtTableWidth').value+document.getElementById('ddlTableWidth').value+"$"}else{modTable=modTable+"100%$"}if(document.getElementById('txtTableHeight').value!=""){modTable=modTable+document.getElementById('txtTableHeight').value+document.getElementById('ddlTableHeight').value+"$"}else{modTable=modTable+"0$"}valueRetreive=document.getElementById('ddlTableAlighment').value;if(valueRetreive!=""){if(valueRetreive=="0"){modTable=modTable+"center$"}if(valueRetreive=="1"){modTable=modTable+"left$"}if(valueRetreive=="2"){modTable=modTable+"right$"}}modTable=modTable+document.getElementById('txtTableBorderColor').value+"$";modTable=modTable+document.getElementById('ddlTableBorderStyle').value+"$";modTable=modTable+document.getElementById('ddlHAlign').value+"$";modTable=modTable+document.getElementById('ddlVAlign').value+"$";if(document.getElementById('txtCellWidth').value!='')modTable=modTable+document.getElementById('txtCellWidth').value+document.getElementById('ddlCellWidth').value+"$";else modTable=modTable+"$";if(document.getElementById('txtCellHeight').value!='')modTable=modTable+document.getElementById('txtCellHeight').value+document.getElementById('ddlCellHeight').value+"$";else modTable=modTable+"$";modTable=modTable+document.getElementById('txtCellRowSpan').value+"$";modTable=modTable+document.getElementById('txtCellColumnSpan').value+"$";modTable=modTable+document.getElementById('chkCellWrap').checked;window.opener.ChangeTableProperites(modTable,'textarea1');window.close()}}function confirmMsg(frm){var chkValue=false;for(i=0;i<frm.length;i++){if(frm.elements[i].name.indexOf("chkDelete")!=-1){chkValue=true;if(frm.elements[i].checked)return confirm('Are you sure you want to delete your selection(s)?')}}if(chkValue==true){alert('Select Atleast One Record To Delete');return false}}function MM_swapImgRestore(){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_preloadImages(){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_findObj(n,d){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(){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 RedirectToLogin(varReturnUrl){window.location.href="login.aspx"+varReturnUrl+""}function RedirectToEmailToFriend(varUrl,varQueryString){window.location.href=varUrl+'?PS='+varQueryString}function RedirectToViewRegisteredMembers(varReturnUrl){window.location.href="EvtHome.aspx"+varReturnUrl+""}var bar_length=200;var bar_height=20;var wait=5000;var shtImgCount=0;var doneyet=0;function setup_bar(bartext){window_width=bar_length+50;window_height=bar_height+50;if(document.all){bar_height2=bar_height-2;bar_width2=bar_length+5}else{bar_height2=bar_height;bar_width2=bar_length+1}document.write('<div id="bar_window" style="position:absolute;left:50%;top:50%;" class="GBL_ProgressBar">'+bartext+'</div>')}function close_bar(){if(document.getElementById('bar_window')!=null){document.getElementById('bar_window').style.visibility='hidden'}adjustLayout();}if(document.readyState){document.onreadystatechange=checkstate}else if(document.addEventListener){document.addEventListener("DOMContentLoaded",saydone,false)}function checkstate(){if(document.readyState=="complete"||document.readyState=="complete")doneyet=1}function saydone(){doneyet=1}setTimeout('saydone();',wait);function mouseOverImage(imgproperty,src,loginid,height,width,alt){imgproperty.style.height=height;imgproperty.style.width=width;imgproperty.src=src;imgproperty.title=alt}function mouseOutImage(imgproperty,src,loginid,height,width,alt){imgproperty.style.height=height;imgproperty.style.width=width;imgproperty.src=src;imgproperty.title=alt}
function adjustLayout(){/*	if(document.all){if(document.getElementById("LeftColumnContainer")!=null)
 var iLeftHeight=document.getElementById("LeftColumnContainer").offsetHeight;if(document.getElementById("ContentContainer")!=null)var iContentHeight=document.getElementById("ContentContainer").offsetHeight;if(document.getElementById("RightColumnContainer")!=null)var iRightHeight=document.getElementById("RightColumnContainer").offsetHeight}else{if(document.getElementById("LeftColumnContainer")!=null)var iLeftHeight=document.getElementById("LeftColumnContainer").clientHeight;if(document.getElementById("ContentContainer")!=null)var iContentHeight=document.getElementById("ContentContainer").clientHeight;if(document.getElementById("RightColumnContainer")!=null)var iRightHeight=document.getElementById("RightColumnContainer").clientHeight}if(iLeftHeight>iContentHeight){if(document.getElementById("ContentContainer")!=null)document.getElementById("ContentContainer").style.height=iLeftHeight+"px"}else{if(document.getElementById("LeftColumnContainer")!=null)document.getElementById("LeftColumnContainer").style.height=iContentHeight+"px"}
		
		
		if(iRightHeight>iContentHeight)
		{
			if(document.getElementById("ContentContainer")!=null)
				document.getElementById("ContentContainer").style.height=iRightHeight+"px"
		}else
		{
			if(document.getElementById("RightColumnContainer")!=null)
				document.getElementById("RightColumnContainer").style.height=iContentHeight+"px"
		}
*/		
		}
		
		function EditComponent(varRedirectionUrl,varActionType){window.parent.opener.location.href=varRedirectionUrl;window.close()}
		function swtop()
		{
			window.scrollTo(0,0);
		}