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&&document.getElementById)x=document.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];}};var sectionColors=new Array(["tv","#666666"],["direct","#666666"],["int","#666666"],["tel","#666666"]);function setColor(color,id,groupid,groupoffers){var src=document.getElementById("chkOffer"+id);var hidden=document.getElementById("chkHidden"+groupid);if(groupoffers!=''){for(var i=0;i<groupoffers.length;i++){if(id!=groupoffers[i]&&document.getElementById(groupoffers[i]+"_header")){document.getElementById(groupoffers[i]+"_header").style.color="#666666";document.getElementById(groupoffers[i]+"_mnthprice").style.color="#666666";document.getElementById(groupoffers[i]+"_oneprice").style.color="#666666";}}}
if(src.checked){src.parentNode.parentNode.className="highlighted";document.getElementById(id+"_header").style.color=color;document.getElementById(id+"_mnthprice").style.color=color;document.getElementById(id+"_oneprice").style.color=color;}else{src.parentNode.parentNode.className="";document.getElementById(id+"_header").style.color="#666666";document.getElementById(id+"_mnthprice").style.color="#666666";document.getElementById(id+"_oneprice").style.color="#666666";}
if(hidden){if(hidden.value&&hidden.value!=id){document.getElementById(hidden.value+"_header").style.color="#666666";document.getElementById(hidden.value+"_mnthprice").style.color="#666666";document.getElementById(hidden.value+"_oneprice").style.color="#666666";}}}
function determineSectionColor(section){for(var i=0;i<sectionColors.length;i++){if(sectionColors[i][0].toString()==section.toString()){return sectionColors[i][1];}}
return;};var colCity=new Array();var colStreet=new Array();var colBuilding=new Array();var cityIsBusy=false;var cityIsDone=false;var streetIsBusy=false;var streetIsDone=false;var buildingIsBusy=false;var buildingIsDone=false;window.onclick=window_Click;function window_Click(evt)
{var cityDiv=document.getElementById('CitySelectionDiv');var streetDiv=document.getElementById('StreetSelectionDiv');var buildingDiv=document.getElementById('BuildingSelectionDiv');var src;if(evt&&evt.target){src=evt.target;}
else if(evt&&evt.srcElement){src=evt.srcElement;}
else{src=window.event.srcElement;}
if(src.tagName.toLowerCase()=='option'){src=src.parentNode;}
if(cityDiv&&cityDiv.style.display==''){if(src.id!='NAW_City'&&src.id!='CitySelector'&&src.id!='CitySelectionDiv'){cityDiv.style.display='none';}}
if(streetDiv&&streetDiv.style.display==''){if(src.id!='NAW_Street'&&src.id!='StreetSelector'&&src.id!='StreetSelectionDiv'){streetDiv.style.display='none';}}
if(buildingDiv&&buildingDiv.style.display==''){if(src.id!='NAW_HouseNumber'&&src.id!='BuildingSelector'&&src.id!='BuildingSelectionDiv'){buildingDiv.style.display='none';}}}
function showDrop(sel,div)
{if(sel.options.length>1){div.style.display='';sel.focus();}else{div.style.display='none';}
return;}
function citySelection(evt)
{var city=document.getElementById('NAW_City').value.toUpperCase();var streetDiv=document.getElementById('StreetSelectionDiv');var buildingDiv=document.getElementById('BuildingSelectionDiv');if(streetDiv&&streetDiv.style.display==''){streetDiv.style.display='none';}
if(buildingDiv&&buildingDiv.style.display==''){buildingDiv.style.display='none';}
if(city!='')
{var cityDiv=document.getElementById('CitySelectionDiv');if(evt.keyCode==40||(evt.keyCode==9&&!evt.shiftKey)){var citySel=document.getElementById('CitySelector');showDrop(citySel,cityDiv);return;}}
if(!cityIsBusy&&!cityIsDone&&colCity.length==0&&city!=''){DOP_DoCallback(WebsiteRoot+'order/rfscheck.php','GetCity=1',cityComplete,city,true,true);cityIsBusy=true;}
else if(!cityIsBusy&&cityIsDone&&city!=''){cityComplete('',city);}}
function citySelect(evt)
{if(!(evt)||evt.keyCode==13||(evt.keyCode==9&&!evt.shiftKey))
{var cityTxt=document.getElementById('NAW_City');var citySel=document.getElementById('CitySelector');var cityDiv=document.getElementById('CitySelectionDiv');var cityHid=document.getElementById('hidCity');cityTxt.value=citySel.options[citySel.selectedIndex].text;cityDiv.style.display='none';var streetTxt=document.getElementById('NAW_Street');streetTxt.disabled=false;streetTxt.value='';streetTxt.focus();cityHid.value=cityTxt.value;colStreet=new Array();streetIsBusy=false;streetIsDone=false;return false;}
return true;}
function cityComplete(response,context)
{var obj=new Array();if(typeof(response)!='undefined'&&response!=''){response=DOP_ProcessResult(response);eval(response);colCity=obj;cityIsBusy=false;cityIsDone=true;}
var citySel=document.getElementById('CitySelector');citySel.options.length=0;var c=0;for(var i=0;i<colCity.length;i++)
{if(colCity[i].indexOf(context)==0){var opt=document.createElement('option');opt.text=colCity[i];opt.value=colCity[i];citySel.options[c++]=opt;}}
if(citySel.options.length>8){citySel.size=8;}
else{citySel.size=4;}
var cityTxt=document.getElementById('NAW_City');var cityDiv=document.getElementById('CitySelectionDiv');if(citySel.options.length>1){cityDiv.style.display='';cityDiv.style.left=(cityTxt.offsetLeft-(cityTxt.offsetWidth-cityTxt.clientWidth)/2)+'px';citySel.style.width=cityTxt.clientWidth+'px';citySel.selectedIndex=0;}
else if(citySel.options.length==1){cityDiv.style.display='none';cityTxt.value=citySel.options[0].text;document.getElementById('hidCity').value=cityTxt.value;document.getElementById('NAW_Street').disabled=false;colStreet=new Array();streetIsBusy=false;streetIsDone=false;}
else{cityDiv.style.display='none';document.getElementById('NAW_Street').value='';document.getElementById('NAW_HouseNumber').value='';document.getElementById('NAW_Street').disabled=true;document.getElementById('NAW_HouseNumber').disabled=true;document.getElementById('hidStreet').value='';document.getElementById('hidBuilding').value='';}}
function streetSelection(evt)
{var city=document.getElementById('NAW_City').value.toUpperCase();var street=document.getElementById('NAW_Street').value.toUpperCase();var buildingDiv=document.getElementById('BuildingSelectionDiv');if(buildingDiv&&buildingDiv.style.display==''){buildingDiv.style.display='none';}
if(street!='')
{var streetDiv=document.getElementById('StreetSelectionDiv');if(evt.keyCode==40||(evt.keyCode==9&&!evt.shiftKey)){var streetSel=document.getElementById('StreetSelector');showDrop(streetSel,streetDiv);return;}}
if(encodeURIComponent){city=encodeURIComponent(city);}
else{city=escape(city);}
if(!streetIsBusy&&!streetIsDone&&colStreet.length==0&&street!=''){DOP_DoCallback(WebsiteRoot+'order/rfscheck.php','GetStreet=1&City='+city,streetComplete,street,true,true);streetIsBusy=true;}
else if(!streetIsBusy&&streetIsDone&&street!=''){streetComplete('',street);}}
function streetSelect(evt)
{if(!(evt)||evt.keyCode==13||(evt.keyCode==9&&!evt.shiftKey))
{var streetTxt=document.getElementById('NAW_Street');var streetSel=document.getElementById('StreetSelector');var streetDiv=document.getElementById('StreetSelectionDiv');var streetHid=document.getElementById('hidStreet');streetTxt.value=streetSel.options[streetSel.selectedIndex].text;streetDiv.style.display='none';var buildingTxt=document.getElementById('NAW_HouseNumber');buildingTxt.disabled=false;buildingTxt.value='';buildingTxt.focus();streetHid.value=streetTxt.value;colBuilding=new Array();buildingIsBusy=false;buildingIsDone=false;return false;}
return true;}
function streetComplete(response,context)
{var obj=new Array();if(typeof(response)!='undefined'&&response!=''){response=DOP_ProcessResult(response);eval(response);colStreet=obj;streetIsBusy=false;streetIsDone=true;}
var streetSel=document.getElementById('StreetSelector');streetSel.options.length=0;var c=0;for(var i=0;i<colStreet.length;i++)
{if(colStreet[i].indexOf(context)==0){var opt=document.createElement('option');opt.text=colStreet[i];opt.value=colStreet[i];streetSel.options[c++]=opt;}}
if(streetSel.options.length>8){streetSel.size=8;}
else{streetSel.size=4;}
var streetTxt=document.getElementById('NAW_Street');var streetDiv=document.getElementById('StreetSelectionDiv');if(streetSel.options.length>1){streetDiv.style.display='';streetDiv.style.left=(streetTxt.offsetLeft-(streetTxt.offsetWidth-streetTxt.clientWidth)/2)+'px';streetSel.style.width=streetTxt.clientWidth+'px';streetSel.selectedIndex=0;}
else if(streetSel.options.length==1){streetDiv.style.display='none';streetTxt.value=streetSel.options[0].text;document.getElementById('hidStreet').value=streetTxt.value;document.getElementById('NAW_HouseNumber').disabled=false;colBuilding=new Array();buildingIsBusy=false;buildingIsDone=false;}
else{streetDiv.style.display='none';document.getElementById('NAW_HouseNumber').value='';document.getElementById('NAW_HouseNumber').disabled=true;document.getElementById('hidBuilding').value='';}}
function buildingSelection(evt)
{var city=document.getElementById('NAW_City').value.toUpperCase();var street=document.getElementById('NAW_Street').value.toUpperCase();var housenumber=document.getElementById('NAW_HouseNumber').value.toUpperCase();if(housenumber!='')
{var buildingDiv=document.getElementById('BuildingSelectionDiv');if(evt.keyCode==40||(evt.keyCode==9&&!evt.shiftKey)){var buildingSel=document.getElementById('BuildingSelector');showDrop(buildingSel,buildingDiv);return;}}
if(encodeURIComponent){city=encodeURIComponent(city);street=encodeURIComponent(street);}
else{city=escape(city);street=escape(street);}
if(!buildingIsBusy&&!buildingIsDone&&colBuilding.length==0&&housenumber!=''){DOP_DoCallback(WebsiteRoot+'order/rfscheck.php','GetBuilding=1&City='+city+'&Street='+street,buildingComplete,housenumber,true,true);buildingIsBusy=true;}
else if(!buildingIsBusy&&buildingIsDone&&housenumber!=''){buildingComplete('',housenumber);}}
function buildingSelect(evt)
{if(!(evt)||evt.keyCode==13||(evt.keyCode==9&&!evt.shiftKey))
{var buildingTxt=document.getElementById('NAW_HouseNumber');var buildingSel=document.getElementById('BuildingSelector');var buildingDiv=document.getElementById('BuildingSelectionDiv');var buildingHid=document.getElementById('hidBuilding');buildingTxt.value=buildingSel.options[buildingSel.selectedIndex].text;buildingDiv.style.display='none';buildingHid.value=buildingTxt.value;return false;}
return true;}
function buildingComplete(response,context)
{var obj=new Array();if(typeof(response)!='undefined'&&response!=''){response=DOP_ProcessResult(response);eval(response);colBuilding=obj;buildingIsBusy=false;buildingIsDone=true;}
var buildingSel=document.getElementById('BuildingSelector');buildingSel.options.length=0;var c=0;for(var i=0;i<colBuilding.length;i++)
{if(colBuilding[i].indexOf(context)==0){var opt=document.createElement('option');opt.text=colBuilding[i];opt.value=colBuilding[i];buildingSel.options[c++]=opt;}}
if(buildingSel.options.length>8){buildingSel.size=8;}
else{buildingSel.size=4;}
var buildingTxt=document.getElementById('NAW_HouseNumber');var buildingDiv=document.getElementById('BuildingSelectionDiv');if(buildingSel.options.length>1){buildingDiv.style.display='';buildingDiv.style.left=(buildingTxt.offsetLeft-(buildingTxt.offsetWidth-buildingTxt.clientWidth)/2)+'px';buildingSel.style.width=buildingTxt.clientWidth+'px';buildingSel.selectedIndex=0;}
else if(buildingSel.options.length==1){buildingDiv.style.display='none';buildingTxt.value=buildingSel.options[0].text;document.getElementById('hidBuilding').value=buildingTxt.value;}
else{buildingDiv.style.display='none';}};function handleBasket(response,context)
{if(response.substring(0,9)=='<!DOCTYPE'){return;}
var x;response=DOP_ProcessResult(response);eval(response);if(typeof mainObj!="undefined"){if(typeof mainObj.price_monthly!="undefined"&&document.getElementById(mainObj.id+"_monthlys")){setInnerHTML(mainObj.id+"_monthlys",mainObj.price_monthly);}
if(typeof mainObj.price_setup!="undefined"&&document.getElementById(mainObj.id+"_setups")){setInnerHTML(mainObj.id+"_setups",mainObj.price_setup);}}
if(typeof updateObjs!="undefined"){if(updateObjs.length>0){for(var i=0;i<updateObjs.length;i++){if(typeof updateObjs[i].price_monthly!="undefined"&&document.getElementById(updateObjs[i].id+"_monthlys")){setInnerHTML(updateObjs[i].id+"_monthlys",updateObjs[i].price_monthly);}
if(typeof updateObjs[i].price_monthly!="undefined"&&document.getElementById(updateObjs[i].id+"_monthlym")){setInnerHTML(updateObjs[i].id+"_monthlym",updateObjs[i].price_monthly);}
if(typeof updateObjs[i].price_setup!="undefined"&&document.getElementById(updateObjs[i].id+"_setups")){setInnerHTML(updateObjs[i].id+"_setups",updateObjs[i].price_setup);}
if(typeof updateObjs[i].price_setup!="undefined"&&document.getElementById(updateObjs[i].id+"_setupm")){setInnerHTML(updateObjs[i].id+"_setupm",updateObjs[i].price_setup);}}}}
if(typeof priceObj!="undefined"){if(document.getElementById('deepSellMonthlyPrice')){setInnerHTML('deepSellMonthlyPrice',priceObj.deepSellMonthlyPrice);}
if(document.getElementById('deepSellSetupPrice')){setInnerHTML('deepSellSetupPrice',priceObj.deepSellSetupPrice);}
if(document.getElementById('deepSellSetupPrice')){setInnerHTML('crossSellMonthlyPrice',priceObj.crossSellMonthlyPrice);}
if(document.getElementById('deepSellSetupPrice')){setInnerHTML('crossSellSetupPrice',priceObj.crossSellSetupPrice);}
setInnerHTML('sc_exceptMainMonthlyPrice',priceObj.exceptMainMonthlyPrice);setInnerHTML('sc_exceptMainSetupPrice',priceObj.exceptMainSetupPrice);setInnerHTML('sc_totalMonthlyPrice',priceObj.totalMonthlyPrice);setInnerHTML('sc_totalSetupPrice',priceObj.totalSetupPrice);}
if(typeof uncheckID!="undefined"){if(uncheckID.length>0){for(var i=0;i<uncheckID.length;i++){if(document.getElementById("offer"+uncheckID[i])){document.getElementById("offer"+uncheckID[i]).style.display="none";}
if(document.getElementById(uncheckID[i]+"_monthlym")){setInnerHTML(uncheckID[i]+"_monthlym",'&nbsp;');}
if(document.getElementById(uncheckID[i]+"_setupm")){setInnerHTML(uncheckID[i]+"_setupm",'&nbsp;');}}}}
if(typeof displayObjs!="undefined"){if(displayObjs.length>0){for(var i=0;i<displayObjs.length;i++){if(document.getElementById('offer'+displayObjs[i].id)&&displayObjs[i].handletype=='add'){document.getElementById("offer"+displayObjs[i].id).style.display="block";if(document.getElementById(displayObjs[i].id+"_monthlym")){setInnerHTML(displayObjs[i].id+"_monthlym",displayObjs[i].monthlyprice);}
if(document.getElementById(displayObjs[i].id+"_setupm")){setInnerHTML(displayObjs[i].id+"_setupm",displayObjs[i].setupprice);}}else{if(displayObjs[i].handletype=='add'){if(navigator.appName=='Microsoft Internet Explorer'){var classAttribute='className';var cellSpacingAttribute='cellSpacing';var cellPaddingAttribute='cellPadding';var valignAttribute='vAlign';}else{var classAttribute='class';var cellSpacingAttribute='cellspacing';var cellPaddingAttribute='cellpadding';var valignAttribute='valign';}
var newOffer=document.createElement("div");newOffer.setAttribute('id','offer'+displayObjs[i].id);var offerTitle=document.createElement("h3");var offerTitleText=document.createTextNode(displayObjs[i].name);offerTitle.className='cart_title';var offerBorder=document.createElement("div");offerBorder.setAttribute(classAttribute,'border');var offerTable=document.createElement("table");offerTable.setAttribute(cellSpacingAttribute,'0');offerTable.setAttribute(cellPaddingAttribute,'0');offerTable.setAttribute('border','0');offerTable.setAttribute('summary','offer');offerTable.setAttribute('width','100%');var offerTableBody=document.createElement("tbody");var offerTableRow1=document.createElement("tr");offerTableRow1.setAttribute(valignAttribute,'top');var offerTableRow2=document.createElement("tr");offerTableRow2.setAttribute(valignAttribute,'top');var offerTableRow1Cell1=document.createElement("td");offerTableRow1Cell1.setAttribute('align','left');offerTableRow1Cell1.setAttribute(classAttribute,'regular');var offerTableRow1Cell1Val=document.createTextNode(displayObjs[i].labelmonthlyprice);offerTableRow1Cell1.appendChild(offerTableRow1Cell1Val);var offerTableRow1Cell2=document.createElement("td");offerTableRow1Cell2.setAttribute('align','right');offerTableRow1Cell2.setAttribute(classAttribute,'regular');offerTableRow1Cell2.innerHTML=displayObjs[i].monthlyprice;offerTableRow1Cell2.id=displayObjs[i].id+"_monthlys";var offerTableRow2Cell1=document.createElement("td");offerTableRow2Cell1.setAttribute('align','left');offerTableRow2Cell1.setAttribute(classAttribute,'regular');var offerTableRow2Cell1Val=document.createTextNode(displayObjs[i].labelsetupprice);offerTableRow2Cell1.appendChild(offerTableRow2Cell1Val);var offerTableRow2Cell2=document.createElement("td");offerTableRow2Cell2.setAttribute('align','right');offerTableRow2Cell2.setAttribute(classAttribute,'regular');offerTableRow2Cell2.innerHTML=displayObjs[i].setupprice;offerTableRow2Cell2.id=displayObjs[i].id+"_setups";offerTableRow1.appendChild(offerTableRow1Cell1)
offerTableRow1.appendChild(offerTableRow1Cell2);offerTableRow2.appendChild(offerTableRow2Cell1);offerTableRow2.appendChild(offerTableRow2Cell2);offerTitle.appendChild(offerTitleText);offerTable.appendChild(offerTableBody);offerTableBody.appendChild(offerTableRow1);offerTableBody.appendChild(offerTableRow2);newOffer.appendChild(offerTitle);newOffer.appendChild(offerBorder);newOffer.appendChild(offerTable);var basketoffers=document.getElementById("sc_basketoffers");basketoffers.appendChild(newOffer);if(document.getElementById(displayObjs[i].id+"_monthlym")){setInnerHTML(displayObjs[i].id+"_monthlym",displayObjs[i].monthlyprice);}
if(document.getElementById(displayObjs[i].id+"_setupm")){setInnerHTML(displayObjs[i].id+"_setupm",displayObjs[i].setupprice);}}else{if(typeof document.getElementById("offer"+displayObjs[i].id)!="undefined"){var layer=document.getElementById("offer"+displayObjs[i].id);if(typeof layer=="object"){layer.style.display="none";}}
if(document.getElementById(displayObjs[i].id+"_monthlym")){setInnerHTML(displayObjs[i].id+"_monthlym",'&nbsp;');}
if(document.getElementById(displayObjs[i].id+"_setupm")){setInnerHTML(displayObjs[i].id+"_setupm",'&nbsp;');}}}}}}}