﻿var styleToSelect;var _server='http://www.myweather2.com';function onOk(){$get('Paragraph1').className=styleToSelect}function pageLoad(){if($get('ctl00_MiddleContentHolder_TabMenu1_LoginView1_lnkSaveForecast'))$addHandler($get("ctl00_MiddleContentHolder_TabMenu1_LoginView1_lnkSaveForecast"),'click',showModalSaveForecastPopupViaClient);if($get('ctl00_MiddleContentHolder_TabMenu1_butNoRemoveForecast'))$addHandler($get("ctl00_MiddleContentHolder_TabMenu1_butNoRemoveForecast"),'click',hideModalRemoveForecastPopupViaClient);if($get('ctl00_weather2Login1_lnkGetInTouch'))$addHandler($get("ctl00_weather2Login1_lnkGetInTouch"),'click',showModalGetInTouchPopupViaClient)}function addDeveloperAPILoc(uref){if($get('add_loc_'+uref)){if($get('add_loc_'+uref).style.display=='none')$get('add_loc_'+uref).style.display='';else $get('add_loc_'+uref).style.display='none'}}function editDeveloperAPILoc(uref){if($get('edit_loc_'+uref)){if($get('edit_loc_'+uref).style.display=='none')$get('edit_loc_'+uref).style.display='';else $get('edit_loc_'+uref).style.display='none'}}function showModalGetInTouchPopupViaClient(ev){ev.preventDefault();var modalPopupBehavior=$find('programmaticModalGetInTouchPopupBehavior');modalPopupBehavior.show()}function hideModalRemoveForecastPopupViaClient(){var modalPopupBehavior=$find('programmaticModalRemoveForecastPopupBehavior');modalPopupBehavior.hide()}function hideModalPaypalConfirmPopupViaClient(ev){ev.preventDefault();var modalPopupBehavior=$find('programmaticModalPaypalConfirmPopupBehavior');modalPopupBehavior.hide()}function showModalPopupViaClientOnRequest(b){var modalPopupBehavior=$find(b);modalPopupBehavior.show()}function showModalSaveForecastPopupViaClient(ev){ev.preventDefault();var modalPopupBehavior=$find('programmaticModalSaveForecastPopupBehavior');modalPopupBehavior.show()}function showModalFavouriteForecastPopupViaClient(ev){ev.preventDefault();var modalPopupBehavior=$find('programmaticModalFavouriteForecastPopupBehavior');modalPopupBehavior.show()}function showModalVMapPopupViaClient(ev){ev.preventDefault();var modalPopupBehavior=$find('programmaticModalVMapBehavior');modalPopupBehavior.show()}function SetControlToViewRemoveForecast(v){var uf=document.getElementById("ctl00_MiddleContentHolder_TabMenu1_uf_id");uf.value=v;var modalPopupBehavior=$find('programmaticModalRemoveForecastPopupBehavior');modalPopupBehavior.show()}function onUpdatingForecastData(gridView){var updateProgressDiv=$get('updateProgressDivForecastData');updateProgressDiv.style.display='';var gridViewBounds=Sys.UI.DomElement.getBounds(gridView);var updateProgressDivBounds=Sys.UI.DomElement.getBounds(updateProgressDiv);var x=gridViewBounds.x+Math.round(gridViewBounds.width/2)-Math.round(updateProgressDivBounds.width/2);var y=gridViewBounds.y+Math.round(gridViewBounds.height/15);Sys.UI.DomElement.setLocation(updateProgressDiv,x,y)}function onUpdatedForecastData(){var updateProgressDiv=$get('updateProgressDivForecastData');if(updateProgressDiv!=null)updateProgressDiv.style.display='none'}
function CallPrint(url){var win_height=500;var win_width=620;window.open(url + "&print=yes",'','top=10,left=10,width='+win_width+',height='+win_height+',toolbar=0,scrollbars=1,status=0')}function OpenChildWindow(activityid,fields){var sFeatures="dialogHeight: 250px;";sFeatures+="dialogWidth: 455px;";sFeatures+="center: yes;";sFeatures+="edge: sunken;";sFeatures+="scroll: no;";sFeatures+="status: yes;";sFeatures+="resizeable: no;";var url=_server+'/activity/more-weather-fields.aspx?activityID='+activityid+'&Field_ids='+fields;returnValueFromChild=window.showModalDialog(url,'MoreWeatherFields',sFeatures);if(returnValueFromChild!=null){if(returnValueFromChild.toString()!='N/A'){window.document.getElementById('ctl00_MiddleContentHolder_selected_field_ids').value=returnValueFromChild.toString();window.document.getElementById('ctl00_MiddleContentHolder_btnHiddenForUpdate').click()}}}function OpenUnitChangeWindow(){var sFeatures="dialogHeight: 540px;";sFeatures+="dialogWidth: 410px;";sFeatures+="center: yes;";sFeatures+="edge: sunken;";sFeatures+="scroll: no;";sFeatures+="status: yes;";sFeatures+="resizeable: no;";var url=_server+'/activity/change-unit.aspx';var returnValueFromChild=window.open(url,'UnitChangeWindow',sFeatures);if(returnValueFromChild!=null){if(returnValueFromChild.toString()!='N/A'){window.document.getElementById('ctl00_MiddleContentHolder_unit_change').value=returnValueFromChild.toString();window.document.getElementById('ctl00_MiddleContentHolder_btnHiddenForUnitChange').click()}}}function OpenDialogWindow(opt_value,activity_id,width,height,id){var sFeatures="dialogHeight: "+height+"px;";sFeatures+="dialogWidth: "+width+"px;";sFeatures+="center: yes;";sFeatures+="edge: sunken;";sFeatures+="scroll: no;";sFeatures+="status: yes;";sFeatures+="resizeable: no;";url=_server+'/activity/'+url;var returnValueFromChild=window.showModalDialog(url,id,sFeatures)}function OpenScrollableDialogWindow(url,width,height,id){var sFeatures="dialogHeight: "+height+"px;";sFeatures+="dialogWidth: "+(width*1.5)+"px;";sFeatures+="center: yes;";sFeatures+="edge: sunken;";sFeatures+="scroll: yes;";sFeatures+="status: yes;";sFeatures+="resizeable: no;";var returnValueFromChild=window.showModalDialog(url,id,sFeatures)}function popupWindow(win){var winWidth=400;var winheight=400;if(screen){winWidth=screen.width;winHeight=screen.height}newWindow=window.open(win,'newWin','toolbar=no,location=no,scrollbars=no,resizable=yes,width='+winWidth+',height='+winHeight+',left=0,top=0');newWindow.focus()}
