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>' +
		'<li><a href="default.aspx?rundemo=3">Demo 3</a><br>Performing a worldwide postal code lookup</li>'+
		'<li><a href="default.aspx?rundemo=4">Demo 4</a><br>Japanese address in foreign character set</li>' +
		'</ol>', 650, 100);
}		
function rundemo1()
{
	document.Form1.action = document.Form1.action.split("?")[0];
	DS_showMsgBox("<b>Please sit back and watch the demo.</b>", 5, 75)
	DS_wait(10000);
	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_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_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_jumpPointer(38, 259);
	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_showMsgBox("<b>Please sit back and watch the demo.</b>", 5, 75)
	DS_wait(10000);
	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_jumpPointer(38, 259);
	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);
}

function rundemo3()
{
	document.Form1.action = document.Form1.action.split("?")[0];
	DS_showMsgBox("<b>Please sit back and watch the demo.</b>", 5, 75)
	DS_wait(10000);
	DS_showPointer();
	DS_showMsgBox("This demonstration will show you how to find a postal code for a city if you do not know which country it is in.", 650, 100);
	DS_wait(2000);
	DS_addMsgBoxText("<ol><li>Click on Worldwide.</li></ol>");
	DS_movePointer(394, 109);
	DS_clickPointer();
	DS_callBack('var l = document.getElementById("lstCountry"); l.value="ALL"; 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_setText("txtLocality", "London");
	DS_addMsgBoxText("<ol start=3><li>Click the Search button.</li></ol>");
	DS_movePointer(38, 198);
	DS_clickPointer();
	DS_hideMsgBox()
	DS_hidePointer();
	DS_callBack('document.getElementById("hidRunDemo").value = "3b"; document.getElementById("cmdRevalidate").click();', 1);
}

function rundemo3b()
{
	DS_jumpPointer(38, 259);
	DS_showPointer();
	DS_showMsgBox("You will receive a list of cities that begin with &quot;London&quot;.<br><br>Note that some lines display a postal code, while others only display an asterisk. An asterisk indicates that this city has more than one postal code and you need to enter a street name and use the country dependant search. If you click the action next to any entry, it will fill all data into the input fields and select the country from the country list. Then you can enter a street name and click the Search button again to find the postal code.", 650, 100)
	DS_wait(5000);
	DS_movePointer(385, 345);
	DS_clickPointer();
	DS_hidePointer();
	DS_callBack('document.getElementById("hidRunDemo").value = "3c"; document.getElementById("hidAction").value="copy_2"; document.Form1.submit();', 1);
}

function rundemo3c()
{
	DS_jumpPointer(385, 345);
	DS_showPointer();
	DS_showMsgBox("You will receive a list of cities that begin with &quot;London&quot;.<br><br>Note that some lines display a postal code, while others only display an asterisk. An asterisk indicates that this city has more than one postal code and you need to enter a street name and use the country dependant search. If you click the action next to any entry, it will fill all data into the input fields and select the country from the country list. Then you can enter a street name and click the Search button again to find the postal code.", 650, 100)
	DS_addMsgBoxText('<br><br>Now you can try it for yourself or <a href="default.aspx?rundemo=0">show available demonstrations</a>');
	DS_wait(10000);
	DS_hidePointer();
}

function rundemo4()
{
	document.Form1.action = document.Form1.action.split("?")[0];
	DS_showMsgBox("<b>Please sit back and watch the demo.</b>", 5, 75)
	DS_wait(10000);
	DS_showPointer();
	DS_showMsgBox("This demonstration will show Japanese addresses in foreign character sets.", 650, 100);
	DS_wait(2000);
	DS_addMsgBoxText("<ol><li>Select Japan from the country list.</li></ol>");
	DS_movePointer(178, 109);
	DS_clickPointer();
	DS_callBack('document.getElementById("lstCountry").value = "JPN"; countrychange();', 0);
	DS_addMsgBoxText("<ol start=2><li>Enter the city name into the Locality field.</li></ol>");
	DS_movePointer(170, 130);
	DS_clickPointer();
	DS_setText("txtLocality", "Sapporo");
	DS_addMsgBoxText("<ol start=3><li>Check this box</li></ol>");
	DS_movePointer(20, 278);
	DS_clickPointer();
	DS_callBack('document.getElementById("chkPrefLang").checked = true;', 0);
	DS_addMsgBoxText("<ol start=4><li>Click the Search button</li></ol>");
	DS_movePointer(40, 302);
	DS_clickPointer();
	DS_hideMsgBox()
	DS_hidePointer();
	DS_callBack('document.getElementById("hidRunDemo").value = "4b"; document.getElementById("cmdRevalidate").click();', 1);
}

function rundemo4b()
{
	DS_showMsgBox('Now you can try it for yourself or <a href="default.aspx?rundemo=0">show available demonstrations</a>', 650, 100);
}
