
﻿
function onclickrad(flag,ID,DelNo){var SelFees=document.getElementById("selfee"+DelNo.toString());var DelTot=document.getElementById("tot_"+DelNo.toString());var TotAmt=0;if(flag=="Y")
{SelFees.value=(SelFees.value==""?ID.value:SelFees.value+','+ID.value);TotAmt=document.getElementById('feeam_'+DelNo.toString()+ID.value).value;}
else{SelFees.value=SelFees.value.replace(ID.value,'');SelFees.value=(SelFees.value==","?"":SelFees.value);TotAmt=-document.getElementById('feeam_'+DelNo.toString()+ID.value).value;}
SelFees.value=SelFees.value.replace(',,',',');}
function CheckBoxClicked(ID,DelNo){var getTb=document.getElementById(ID.name+"tbl");var SelFees=document.getElementById("selfee"+DelNo.toString());var TotAmt=0;if(getTb!=null){if(ID.checked==false){getTb.style.position="absolute";getTb.style.visibility="hidden";}
else{getTb.style.position="relative";getTb.style.visibility="visible";}}
var DelTot=document.getElementById("tot_"+DelNo.toString());if(ID.checked)
{SelFees.value=(SelFees.value==""?ID.name:SelFees.value+','+ID.name);TotAmt=document.getElementById(ID.name.replace('a_','feeam_')).value;}
else{SelFees.value=SelFees.value.replace(ID.name,'');SelFees.value=(SelFees.value==","?"":SelFees.value);TotAmt=-document.getElementById(ID.name.replace('a_','feeam_')).value;}
if(DelTot!=null)
{if(parseFloat(DelTot.value)==0&&parseFloat(TotAmt)<0)
{alert("Please select other fees before selecting discount fees first");ID.checked=false;return;}
if(parseFloat(DelTot.value)+parseFloat(TotAmt)<0)
{alert("Please unselect discount fees first");ID.checked=true;return;}
DelTot.value=parseFloat(DelTot.value)+parseFloat(TotAmt)+".00";}
SelFees.value=SelFees.value.replace(',,',',');for(i=0;i<=10;i++){var GetRadID=document.getElementsByName(ID.name+i.toString());if(GetRadID!=null){if(GetRadID[0]){for(var j=0;j<GetRadID.length;j++){GetRadID[j].disabled=(ID.checked==false);GetRadID[j].checked=(ID.checked==false?false:GetRadID.checked)}}}}}
function ValidateActivity(ID){for(var o=1;o<=5;o++){var GetRadID1=document.getElementById('chklist'+o.toString());if(GetRadID1!=null){var Arr=GetRadID1.value.split(",");if(Arr[0]){var FeeSelected=false;for(var j=0;j<Arr.length;j++){var ChkBox1=document.getElementById(Arr[j])
if(ChkBox1.checked==true){FeeSelected=true;for(m=0;m<=10;m++){var GetRadID=document.getElementsByName(Arr[j]+m.toString());if(GetRadID!=null){if(GetRadID[0]){var RadCheck=false;for(var k=0;k<GetRadID.length;k++){RadCheck=(GetRadID[k].checked?true:false);if(RadCheck==true)break;}
if(RadCheck==false){alert("Please Select No for optional activities which u dont want to attend !");return false;}}}}}}
if(FeeSelected==false){alert("You have to select atleast one activity per delegate !");return false;}}}
else
return true;}}
function GetAjaxString(IDD,URL)
{try
{var XMLHTTP=GetxmlHttp();var ID1=document.getElementById(IDD);if(XMLHTTP!=null&&ID1!=null)
{XMLHTTP.onreadystatechange=function()
{if(XMLHTTP.readyState==4)
{var GetText=XMLHTTP.responseText;if(GetText!=null)
{ID1.innerHTML=GetText;}}}
XMLHTTP.open("GET",URL,true);XMLHTTP.send(null);}}
catch(e)
{}}
function GetxmlHttp()
{var xmlHttp;try
{xmlHttp=new XMLHttpRequest();return xmlHttp;}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");return xmlHttp;}
catch(e)
{try
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");return xmlHttp;}
catch(e)
{alert("Your browser does not support AJAX!");return null;}}}}
function DoPopup(ID)
{if(ID!=null)
{var Obj=findPos(ID);var IDPop=document.getElementById('Pop');if(IDPop!=null)
{var IDPopp=document.getElementById('popp');var htmlCo="<span id='evspan'>Event Name</span><span style='height:70%;'>Display event Logo/ more info about event/ short write up </span><br/><span><a href='#'>register</a> | <a href='#'>Event Schedule</a> | <a href='#'>More info</a></span><span style='height:10%;'></span>";IDPopp.innerHTML=htmlCo;IDPop.style.visibility="visible";IDPop.style.left=Obj[0]-100;IDPop.style.top=Obj[1]-80;}
else
alert('null');}}
function TellaFriend(Code)
{if(Code!='')
{window.open("tellafriend.aspx?ev="+Code+"&",'_tella','height=220,width=550,menubar=no,location=no,toolbar=no,statusbar=no');}}
function trim(str)
{return str.replace(/^\s+|\s+$/,'');}
function echeck(str){var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if(str.indexOf(at)==-1){alert("Invalid E-mail ID")
return false}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){alert("Invalid E-mail ID")
return false}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){alert("Invalid E-mail ID")
return false}
if(str.indexOf(at,(lat+1))!=-1){alert("Invalid E-mail ID")
return false}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){alert("Invalid E-mail ID")
return false}
if(str.indexOf(dot,(lat+2))==-1){alert("Invalid E-mail ID")
return false}
if(str.indexOf(" ")!=-1){alert("Invalid E-mail ID")
return false}
return true}
function DoTellSubmit()
{var fname=document.getElementById('fName');var femail=document.getElementById('fEmail');var yName=document.getElementById('yName');var yEmail=document.getElementById('yEmail');if(fname!=null&&femail!=null&&yName!=null&&yEmail!=null)
{if(trim(fname.value)==""||trim(yName.value)==""||trim(femail.value)==""||trim(yEmail.value)=="")
alert("All Fields are mandatory !!");else
{if(echeck(yEmail.value)==false)
{yEmail.focus();return;}
if(echeck(femail.value)==false)
{femail.focus();return;}
document.forms[0].submit();}}}
function ResizeImg(IDImg)
{if(IDImg!=null)
{if(IDImg.width>160)
{IDImg.width=160;}
if(IDImg.height>60)
{IDImg.height=60;}}
else
Alert("Null");}
function detectBrowser()
{var browser=navigator.appName;var b_version=navigator.appVersion;var version=parseFloat(b_version);if(browser=="Netscape")
return"NN";if(browser=="Microsoft Internet Explorer")
return"IE";}
function MouseOver(Sel)
{var ID=Sel;if(ID!=null)
{ID.style.borderBottom='inset 2px Orange';}
else
alert("Nul");}
function MouseOut(Sel)
{var ID=Sel;if(ID!=null)
{ID.style.borderBottom='outset 0px Orange';}
else
alert("Null");}
function hideSub()
{if(ActiveSub!=null)
{ActiveSub.style.visibility="hidden";ActiveSub=null;}}
function hidethis(ID)
{if(ID!=null)
ID.style.visibility="hidden";}
var GlobSch=null;function SetupPosSch(tmpID)
{var ID=null;var ID2=null;if(GlobSch==null)
ID=document.getElementById('tb1');else
ID=GlobSch;var StrH=ID.id.substr(2,1);var StrS=tmpID.id.substr(2,1);ID2=document.getElementById('tb'+StrS);var daycap=document.getElementById('daycap');daycap.setAttribute("innerText",tmpID.title);var TDShow=document.getElementById("td"+StrS);var TDHide=document.getElementById("td"+StrH);if(ID2==GlobSch||ID==ID2)
return;if(ID!=null&&ID2!=null)
{GlobSch=ID2;var Obj=findPos(ID);ID2.style.left=Obj[0];ID2.style.top=Obj[1];ID2.style.width=ID.offsetWidth;if(detectBrowser()!="IE")
{ID.style.position="absolute";}
ID2.style.visibility="visible";ID.style.visibility="hidden";document.getElementById("tmpTd").setAttribute("height",ID2.offsetHeight);TDHide.style.backgroundColor="gray";TDHide.style.color="black";TDHide.style.borderTop="outset 0px";TDShow.style.color="white";TDShow.style.borderTop="outset 3px Orange";TDShow.style.backgroundColor="#9F0206";}
else
alert("Null");}
function SetupPos(tbShow,tbHide)
{var ID=document.getElementById(tbHide);var ID2=document.getElementById(tbShow);var TDShow=document.getElementById("td"+tbShow);var TDHide=document.getElementById("td"+tbHide);if(ID!=null&&ID2!=null)
{var Obj=findPos(ID);ID2.style.left=Obj[0];ID2.style.top=Obj[1];ID2.style.width=ID.offsetWidth;if(detectBrowser()!="IE")
{ID.style.position="absolute";}
ID2.style.visibility="visible";ID.style.visibility="hidden";document.getElementById("tmpTd").setAttribute("height",ID2.offsetHeight+10+"px");document.getElementById("tmpTd").style.height=ID2.offsetHeight+10+"px";TDShow.style.backgroundColor="#9F0206";TDShow.style.borderTop="outset 3px Orange";TDShow.style.color="Black";TDShow.style.borderTop="outset 3px Orange";TDHide.style.backgroundColor="gray";TDHide.style.color="White";TDHide.style.borderTop="outset 0px";}
else
alert("Null");}
var ActiveSub=null;function ShowSubMenu(TD,DIV)
{var ID=document.getElementById(DIV);if(ID!=null&&TD!=null)
{ActiveSub=ID;var Obj=findPos(TD);ID.style.visibility="visible";ID.style.left=Obj[0]-(ID.offsetWidth-TD.offsetWidth)-2+"px";ID.style.top=Obj[1]+21+"px";}
else
alert("Null");}
function findPos(obj)
{var curleft=curtop=0;if(obj.offsetParent)
{do
{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}
while(obj=obj.offsetParent);}
return[curleft,curtop];}
function RoundCorner(ObjectId,Corner,AdoptColor)
{var ParentDiv=document.getElementById(ObjectId);for(i=1;i<=6;i++)
{var t,l,w,h;switch(i)
{case 1:t=0;l=0;w=1;h=9;if(Corner=="LB"||Corner=="RB"){t=(ParentDiv.style.pixelHeight-9);}
if(Corner=="RT"||Corner=="RB"){l=(ParentDiv.style.pixelWidth-1);}
break;case 2:t=0;l=1;w=1;h=6;if(Corner=="LB"||Corner=="RB"){t=(ParentDiv.style.pixelHeight-6);}
if(Corner=="RT"||Corner=="RB"){l=(ParentDiv.style.pixelWidth-2);}
break;case 3:t=0;l=2;w=1;h=4;if(Corner=="LB"||Corner=="RB"){t=(ParentDiv.style.pixelHeight-4);}
if(Corner=="RT"||Corner=="RB"){l=(ParentDiv.style.pixelWidth-3);}
break;case 4:t=0;l=3;w=1;h=3;if(Corner=="LB"||Corner=="RB"){t=(ParentDiv.style.pixelHeight-3);}
if(Corner=="RT"||Corner=="RB"){l=(ParentDiv.style.pixelWidth-4);}
break;case 5:t=0;l=4;w=2;h=2;if(Corner=="LB"||Corner=="RB"){t=(ParentDiv.style.pixelHeight-2);}
if(Corner=="RT"||Corner=="RB"){l=(ParentDiv.style.pixelWidth-6);}
break;case 6:t=-1;l=4;w=5;h=1;if(Corner=="LB"||Corner=="RB"){t=(ParentDiv.style.pixelHeight-1);}
if(Corner=="RT"||Corner=="RB"){l=(ParentDiv.style.pixelWidth-9);}
break;}
var NewDiv=document.createElement("div");NewDiv.setAttribute("id",Corner+i);NewDiv.style.position="absolute";NewDiv.style.fontSize="1px";if(AdoptColor=="Y")
{NewDiv.style.backgroundColor=document.getElementById(ObjectId).parentElement.style.backgroundColor;}
else
{NewDiv.style.backgroundColor=document.body.style.backgroundColor;}
NewDiv.style.top=t+"px";NewDiv.style.left=l+"px";NewDiv.style.width=w+"px";NewDiv.style.height=h+"px";ParentDiv.appendChild(NewDiv);NewDiv="";}}