<!--//

function getParams() {

var idx = document.URL.indexOf('?');

var params = new Array();

if (idx != -1) {

var pairs = document.URL.substring(idx+1, document.URL.length).split('&');

for (var i=0; i<pairs.length; i++) {

nameVal = pairs[i].split('=');

params[nameVal[0]] = nameVal[1];

   }

}

return params;

}



//-------------------//

// browser detection

//-------------------//

// IE

var ie = (document.all) ? true : false;	

// Netscape 4.x

var ns4 = (document.layers) ? true : false; 

// Netscape 6+, IE 5+ and all standard compliant browsers

var ob = (document.getElementById && !document.all) ? true : false;





function ctymsg(obj)

{

		

	    sub_type = unescape(params["sub_type"]);

				

		if (sub_type=='0') {    

            if (ie || ob) {

            document.getElementById('per_sub').style.position = 'relative';

            document.getElementById('per_sub').style.visibility = 'visible';

            } else {

            document.layers['per_sub'].position = 'relative';

            document.layers['per_sub'].visibility = 'visible';

		}

            } else  {           

            if (ie || ob) {

            document.getElementById('per_sub').style.position = 'absolute';

            document.getElementById('per_sub').style.visibility = 'hidden';

				

            } else {

            document.layers['per_sub'].position = 'absolute';

            document.layers['per_sub'].visibility = 'hidden';

				

            }

        }	

		

		if (sub_type=='1') {    

            if (ie || ob) {

            document.getElementById('std_sub').style.position = 'relative';

            document.getElementById('std_sub').style.visibility = 'visible';

            } else {

            document.layers['std_sub'].position = 'relative';

            document.layers['std_sub'].visibility = 'visible';

		}

            } else  {           

            if (ie || ob) {

            document.getElementById('std_sub').style.position = 'absolute';

            document.getElementById('std_sub').style.visibility = 'hidden';

				

            } else {

            document.layers['std_sub'].position = 'absolute';

            document.layers['std_sub'].visibility = 'hidden';

				

            }

        }	



		if (sub_type=='2') {    

            if (ie || ob) {

            document.getElementById('gift_sub').style.position = 'relative';

            document.getElementById('gift_sub').style.visibility = 'visible';

            } else {

            document.layers['gift_sub'].position = 'relative';

            document.layers['gift_sub'].visibility = 'visible';

		}

            } else  {           

            if (ie || ob) {

            document.getElementById('gift_sub').style.position = 'absolute';

            document.getElementById('gift_sub').style.visibility = 'hidden';

				

            } else {

            document.layers['gift_sub'].position = 'absolute';

            document.layers['gift_sub'].visibility = 'hidden';

				

            }

        }	

	

		if (sub_type=='3') {    

            if (ie || ob) {

            document.getElementById('renew_sub').style.position = 'relative';

            document.getElementById('renew_sub').style.visibility = 'visible';

            } else {

            document.layers['renew_sub'].position = 'relative';

            document.layers['renew_sub'].visibility = 'visible';

		}

            } else  {           

            if (ie || ob) {

            document.getElementById('renew_sub').style.position = 'absolute';

            document.getElementById('renew_sub').style.visibility = 'hidden';

				

            } else {

            document.layers['renew_sub'].position = 'absolute';

            document.layers['renew_sub'].visibility = 'hidden';

				

            }

        }	





}



function choose_country()



{



window.open(document.form1.select1.options[document.form1.select1.selectedIndex].value, target="_self")



}



function choose_sub()



{



if ((document.form2.sub_term[0].checked==false) && (document.form2.sub_term[1].checked==false) && (document.form2.sub_term[2].checked==false) && (document.form2.sub_term[3].checked==false))

	

	{

		alert("Please select your subscription type");

		document.form2.sub_term[0].focus();

		return false;	

	}





if (document.form2.sub_term[0].checked==true) {



window.open("subscribe2.html?sub_type=0", "_self")



}



if (document.form2.sub_term[1].checked==true) {



window.open("subscribe2.html?sub_type=1", "_self")



}



if (document.form2.sub_term[2].checked==true) {



window.open("bulk_subs.html", "_self")



}



if (document.form2.sub_term[3].checked==true) {



window.open("subscribe2.html?sub_type=2", "_self")



}



}



function writeform()

{

sub_type = unescape(params["sub_type"]);



if (sub_type=='0') {

			document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=0&sub_type=' + sub_type + '">Australia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=1&sub_type=' + sub_type + '">Brunei</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=2&sub_type=' + sub_type + '">China</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=3&sub_type=' + sub_type + '">Hong Kong</option>');

                        document.write('<option value="https://www.wsj-asia.com/subhome/subscription_india">India</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=5&sub_type=' + sub_type + '">Indonesia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=6&sub_type=' + sub_type + '">Japan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=7&sub_type=' + sub_type + '">Korea</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=8&sub_type=' + sub_type + '">Malaysia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=9&sub_type=' + sub_type + '">Macau</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=10&sub_type=' + sub_type + '">New Zealand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=11&sub_type=' + sub_type + '">Pacific Islands</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=12&sub_type=' + sub_type + '">Pakistan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=13&sub_type=' + sub_type + '">Philippines</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=14&sub_type=' + sub_type + '">Singapore</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=15&sub_type=' + sub_type + '">Sri Lanka</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=16&sub_type=' + sub_type + '">Taiwan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form.html?country=17&sub_type=' + sub_type + '">Thailand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=18&sub_type=' + sub_type + '">Vietnam</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=19&sub_type=' + sub_type + '">Other Asian Countries</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=20&sub_type=' + sub_type + '">Europe</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=21&sub_type=' + sub_type + '">North America</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/subscribe_form_pdf.html?country=22&sub_type=' + sub_type + '">Rest of the World</option>');                        

                        }



if (sub_type=='1') {



			document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=0&sub_type=' + sub_type + '">Australia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=1&sub_type=' + sub_type + '">Brunei</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=2&sub_type=' + sub_type + '">China</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=3&sub_type=' + sub_type + '">Hong Kong</option>');

                        document.write('<option value="https://www.wsj-asia.com/subhome/subscription_india_student">India</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=5&sub_type=' + sub_type + '">Indonesia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=6&sub_type=' + sub_type + '">Japan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=7&sub_type=' + sub_type + '">Korea</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=8&sub_type=' + sub_type + '">Malaysia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=9&sub_type=' + sub_type + '">Macau</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=10&sub_type=' + sub_type + '">New Zealand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=11&sub_type=' + sub_type + '">Pacific Islands</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=12&sub_type=' + sub_type + '">Pakistan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=13&sub_type=' + sub_type + '">Philippines</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=14&sub_type=' + sub_type + '">Singapore</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=15&sub_type=' + sub_type + '">Sri Lanka</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=16&sub_type=' + sub_type + '">Taiwan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=17&sub_type=' + sub_type + '">Thailand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=18&sub_type=' + sub_type + '">Vietnam</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=19&sub_type=' + sub_type + '">Other Asian Countries</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=20&sub_type=' + sub_type + '">Europe</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=21&sub_type=' + sub_type + '">North America</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/student_form.html?country=22&sub_type=' + sub_type + '">Rest of the World</option>');                                             



}



if (sub_type=='2') {



			document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=0&sub_type=' + sub_type + '">Australia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=1&sub_type=' + sub_type + '">Brunei</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=2&sub_type=' + sub_type + '">China</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=3&sub_type=' + sub_type + '">Hong Kong</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=4&sub_type=' + sub_type + '">India</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=5&sub_type=' + sub_type + '">Indonesia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=6&sub_type=' + sub_type + '">Japan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=7&sub_type=' + sub_type + '">Korea</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=8&sub_type=' + sub_type + '">Malaysia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=9&sub_type=' + sub_type + '">Macau</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=10&sub_type=' + sub_type + '">New Zealand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=11&sub_type=' + sub_type + '">Pacific Islands</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=12&sub_type=' + sub_type + '">Pakistan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=13&sub_type=' + sub_type + '">Philippines</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=14&sub_type=' + sub_type + '">Singapore</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=15&sub_type=' + sub_type + '">Sri Lanka</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=16&sub_type=' + sub_type + '">Taiwan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=17&sub_type=' + sub_type + '">Thailand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=18&sub_type=' + sub_type + '">Vietnam</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=19&sub_type=' + sub_type + '">Other Asian Countries</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=20&sub_type=' + sub_type + '">Europe</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=21&sub_type=' + sub_type + '">North America</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/gift_form.html?country=22&sub_type=' + sub_type + '">Rest of the World</option>');                                             



}



if (sub_type=='3') {



			document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=0&sub_type=' + sub_type + '">Australia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=1&sub_type=' + sub_type + '">Brunei</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=2&sub_type=' + sub_type + '">China</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=3&sub_type=' + sub_type + '">Hong Kong</option>');

                        document.write('<option value="https://www.wsj-asia.com/subhome/renewal_india">India</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=5&sub_type=' + sub_type + '">Indonesia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=6&sub_type=' + sub_type + '">Japan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=7&sub_type=' + sub_type + '">Korea</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=8&sub_type=' + sub_type + '">Malaysia</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=9&sub_type=' + sub_type + '">Macau</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=10&sub_type=' + sub_type + '">New Zealand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=11&sub_type=' + sub_type + '">Pacific Islands</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=12&sub_type=' + sub_type + '">Pakistan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=13&sub_type=' + sub_type + '">Philippines</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=14&sub_type=' + sub_type + '">Singapore</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=15&sub_type=' + sub_type + '">Sri Lanka</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=16&sub_type=' + sub_type + '">Taiwan</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=17&sub_type=' + sub_type + '">Thailand</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=18&sub_type=' + sub_type + '">Vietnam</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=19&sub_type=' + sub_type + '">Other Asian Countries</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=20&sub_type=' + sub_type + '">Europe</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=21&sub_type=' + sub_type + '">North America</option>');

                        document.write('<option value="https://www.wsj-asia.com/formfile/renew_form.html?country=22&sub_type=' + sub_type + '">Rest of the World</option>');                                             



}



}

//-->

