﻿function rundemo0()
{
	document.Form1.action = document.Form1.action.split("?")[0];
	DS_showMsgBox('Several demonstrations are available that show different aspects of the AddressDoctor Postal Code Lookup.<br><ol><li><a href="default.aspx?rundemo=1">Demo 1</a><br>Searching for Postal Codes</li><li><a href="default.aspx?rundemo=2">Demo 2</a><br>Retrieving complete UK addresses with Postal Code and House Number</li></ol>', 650, 100);
}		

function rundemo1()
{
	document.Form1.action = document.Form1.action.split("?")[0];		
	DS_showPointer();
	DS_showMsgBox("This demonstration will show you how to search for Postal Codes with the AddressDoctor Postal Code Lookup.", 650, 100);
	DS_wait(2000);
	DS_addMsgBoxText("<ol><li>Select the country.</li></ol>");
	DS_movePointer(160, 109);
	DS_clickPointer();
	DS_callBack('var l = document.getElementById("lstCountry"); l.value="DEU"; countrychange();', 0);
	DS_addMsgBoxText("<ol start=2><li>Type the city name into the Locality field.</li></ol>");
	DS_movePointer(160, 132);
	DS_clickPointer();
//		DS_focusField("txtLocality");
	DS_setText("txtLocality", "Maxdorf");
	DS_addMsgBoxText("<ol start=3><li>Type the first letters of the street name and the house number.</li></ol>");
	DS_movePointer(142, 156);
	DS_clickPointer();
//		DS_focusField("txtStreet");
	DS_setText("txtStreet", "Rö 9");
	DS_addMsgBoxText("<ol start=4><li>Click the Search button.</li></ol>");
	DS_movePointer(38, 259);
	DS_clickPointer();
	DS_hideMsgBox()
	DS_hidePointer();
	DS_callBack('document.getElementById("hidRunDemo").value = "1b"; document.getElementById("cmdRevalidate").click();', 1);
}

function rundemo1b()
{
	DS_showPointer();
	DS_showMsgBox("After validation you will be presented with a list of suggestions.", 650, 100);
	DS_wait(2000);
	DS_movePointer(481, 389);
	DS_clickPointer();
	DS_hideMsgBox();
	DS_hidePointer();
	DS_callBack('document.getElementById("hidRunDemo").value = "1c"; document.getElementById("hidAction").value="copy_1"; document.Form1.submit();', 1);
}

function rundemo1c()
{
	DS_showMsgBox('Now you can try it for yourself or <a href="default.aspx?rundemo=0">show available demonstrations</a>', 650, 100);
}

function rundemo2()
{
	document.Form1.action = document.Form1.action.split("?")[0];
	DS_showPointer();
	DS_showMsgBox("This demonstration will show you how to supplement the entire address from just the Postal Code and House Number in the United Kingdom.", 650, 100);
	DS_wait(2000);
	DS_addMsgBoxText("<ol><li>Select United Kingdom from the country list.</li></ol>");
	DS_movePointer(160, 109);
	DS_clickPointer();
	DS_callBack('var l = document.getElementById("lstCountry"); l.value="GBR"; countrychange();', 0);
	DS_addMsgBoxText("<ol start=2><li>Type the Postal Code into the Postal Code field.</li></ol>");
	DS_movePointer(175, 222);
	DS_clickPointer();
	DS_setText("txtPoco", "EC1V 9HQ");
	DS_addMsgBoxText("<ol start=3><li>Type the House number into the House Number field.</li></ol>");
	DS_movePointer(167, 176);
	DS_clickPointer();
	DS_setText("txtHNO", "148");
	DS_addMsgBoxText("<ol start=4><li>Click the Search button.</li></ol>");
	DS_movePointer(38, 259);
	DS_clickPointer();
	DS_hideMsgBox()
	DS_hidePointer();
	DS_callBack('document.getElementById("hidRunDemo").value = "2b"; document.getElementById("cmdRevalidate").click();', 1);
}

function rundemo2b()
{
	DS_showMsgBox("As you can see, the entire address could be retrieved from only the Postal Code and House Number", 650, 100);
	DS_showPointer();
	DS_movePointer(439, 121);
	DS_movePointer(592, 121);
	DS_movePointer(592, 217);
	DS_movePointer(439, 217);
	DS_movePointer(439, 121);
	DS_hidePointer();
	DS_showMsgBox('Now you can try it for yourself or <a href="default.aspx?rundemo=0">show available demonstrations</a>', 650, 100);
}

