
/*****************************************************/
/*** wd.js - javascript for waferdata.com web site ***/
/*****************************************************/

var t;
var s;
var m;
var i;
var idx=0;
var items=18;
var dir = 'NONE';
var pic = new Array();
var des = new Array();
var the_key;

for (i=0;i<items;i++)
	pic[i] = new Image();

pic[0].src = "images/Xcorr_5.gif";
pic[1].src = "images/Xcap_5.gif";
pic[2].src = "images/Xtr_5.gif";
pic[3].src = "images/mt1.gif";
pic[4].src = "images/Xxy_5.gif";
pic[5].src = "images/res.gif";
pic[6].src = "images/test.gif";
pic[7].src = "images/Xwmb2d_5.gif";
pic[8].src = "images/Xwmb3d_5.gif";
pic[9].src = "images/Xwms2d_5.gif";
pic[10].src = "images/Xwms3d_5.gif";
pic[11].src = "images/Xwui_5.gif";
pic[12].src = "images/Xwlh_5.gif";
pic[13].src = "images/Xwts_5.gif";
pic[14].src = "images/Xwcap_5.gif";
pic[15].src = "images/Xwxy_5.gif";
pic[16].src = "images/Xwtr_5.gif";
pic[17].src = "images/Xwwm_5.gif";

des[0] = 'correlation coefficients';
des[1] = 'capability chart';
des[2] = 'trend chart';
des[3] = 'multi-trend chart';
des[4] = 'scatter (XY) chart';
des[5] = 'results spreadsheet'
des[6] = 'test summary spreadsheet'
des[7] = '2D wafer bar map';
des[8] = '3D wafer bar map';
des[9] = '2D surface wafer map';
des[10] = '3D surface wafer map';
des[11] = 'web report selection';
des[12] = 'web lot history';
des[13] = 'web test summary';
des[14] = 'web capability chart';
des[15] = 'web scatter (XY) chart';
des[16] = 'web trend chart';
des[17] = 'web wafer map';

var hm;
var ps;
var ps1;
var ps2;
var ps3;
var ps1a;
var ps1b;
var cm;
var cm1;
var cm2;
var ct;
var ct1;
var ct2;
var ct3;
var nw;
var nw1;
var nw2;

var sub_cl = '#FFFFFF';
var sub_cl_h = '#FF0000';
var sub_bg = '#FF0000';
var sub_bg_h = '#C0C0C0';

var fg = '#FFFFFF';
var bg = '#FF0000';
var sfg = '#FFFFFF';
var sbg = '#FF0000';

var curr = '';
var last = '';

function get_vals() {
	hm = document.getElementById('hm');

	ps = document.getElementById('ps');
	ps1 = document.getElementById('ps1');
	ps2 = document.getElementById('ps2');
	ps3 = document.getElementById('ps3');
	ps1a = document.getElementById('ps1a');
	ps1b = document.getElementById('ps1b');

	cm = document.getElementById('cm');
	cm1 = document.getElementById('cm1');
	cm2 = document.getElementById('cm2');

	ct = document.getElementById('ct');
	ct1 = document.getElementById('ct1');
	ct2 = document.getElementById('ct2');
	ct3 = document.getElementById('ct3');

	nw = document.getElementById('nw');
	nw1 = document.getElementById('nw1');
	nw2 = document.getElementById('nw2');
}

function disable_menus() {
	get_vals();

	ps1.style.cursor = 'auto';
	ps2.style.cursor = 'auto';
	ps3.style.cursor = 'auto';
	ps1a.style.cursor = 'auto';
	ps1b.style.cursor = 'auto';

	ps1.style.color = 'transparent';
	ps2.style.color = 'transparent';
	ps3.style.color = 'transparent';
	ps1a.style.color = 'transparent';
	ps1b.style.color = 'transparent';

	ps1.style.backgroundColor = 'transparent';
	ps2.style.backgroundColor = 'transparent';
	ps3.style.backgroundColor = 'transparent';
	ps1a.style.backgroundColor = 'transparent';
	ps1b.style.backgroundColor = 'transparent';

	ps1.style.visibility = "hidden";
	ps2.style.visibility = "hidden";
	ps3.style.visibility = "hidden";
	ps1a.style.visibility = "hidden";
	ps1b.style.visibility = "hidden";

	cm1.style.cursor = 'auto';
	cm2.style.cursor = 'auto';

	cm1.style.color = 'transparent';
	cm2.style.color = 'transparent';

	cm1.style.backgroundColor = 'transparent';
	cm2.style.backgroundColor = 'transparent';

	cm1.style.visibility = "hidden";
	cm2.style.visibility = "hidden";

	ct1.style.cursor = 'auto';
	ct2.style.cursor = 'auto';
	ct3.style.cursor = 'auto';

	ct1.style.color = 'transparent';
	ct2.style.color = 'transparent';
	ct3.style.color = 'transparent';

	ct1.style.backgroundColor = 'transparent';
	ct2.style.backgroundColor = 'transparent';
	ct3.style.backgroundColor = 'transparent';

	ct1.style.visibility = "hidden";
	ct2.style.visibility = "hidden";
	ct3.style.visibility = "hidden";

	nw1.style.cursor = 'auto';
	nw2.style.cursor = 'auto';

	nw1.style.color = 'transparent';
	nw2.style.color = 'transparent';

	nw1.style.backgroundColor = 'transparent';
	nw2.style.backgroundColor = 'transparent';

	nw1.style.visibility = "hidden";
	nw2.style.visibility = "hidden";
}

function enable_menu() {
	get_vals();

	var el = arguments[0];
	if (el == 'prod') {
		ps1.style.visibility = "visible";
		ps2.style.visibility = "visible";
		ps3.style.visibility = "visible";
		ps1a.style.visibility = "visible";
		ps1b.style.visibility = "visible";
	}
	if (el == 'comp') {
		cm1.style.visibility = "visible";
		cm2.style.visibility = "visible";
	}
	if (el == 'cont') {
		ct1.style.visibility = "visible";
		ct2.style.visibility = "visible";
		ct3.style.visibility = "visible";
	}
	if (el == 'news') {
		nw1.style.visibility = "visible";
		nw2.style.visibility = "visible";
	}
}

function m_over() {
	last = curr;
	curr = arguments[0];
	get_vals();
	var el = arguments[0];
	disable_menus();

	if ((el == 'prod')||(el == 'prod1')||(el == 'prod2')||(el == 'prod3')||(el == 'prod1a')||(el == 'prod1b')) {	
		if ((curr == 'prod1a')||(curr == 'prod1b')) {
			if ((last == 'prod2')||(last == 'prod3')) {
				return;
			}
		} else if ((curr == 'prod2')||(curr == 'prod3')) {
			if ((last == 'prod1a')||(last == 'prod1b')) {
				return;
			}
		}

		enable_menu(el.substring(0,4));
		ps1.style.cursor = 'default';
		ps2.style.cursor = 'pointer';
		ps3.style.cursor = 'pointer';

		if (el == 'prod1') {
			ps1.style.color = sub_cl_h;
			ps1.style.backgroundColor = sub_bg_h;
		} else {
			ps1.style.color = sub_cl;
			ps1.style.backgroundColor = sub_bg;
		}

		if (el == 'prod2') {
			ps2.style.color = sub_cl_h;
			ps2.style.backgroundColor = sub_bg_h;
		} else {
			ps2.style.color = sub_cl;
			ps2.style.backgroundColor = sub_bg;
		}

		if (el == 'prod3') {
			ps3.style.color = sub_cl_h;
			ps3.style.backgroundColor = sub_bg_h;
		} else {
			ps3.style.color = sub_cl;
			ps3.style.backgroundColor = sub_bg;
		}

		if ((el == 'prod1')||(el == 'prod1a')||(el == 'prod1b')) {
			ps1a.style.top = "-59px";
			if (el == 'prod1a') {
				ps1a.style.color = sub_cl_h;
				ps1a.style.backgroundColor = sub_bg_h;
			} else {
				ps1a.style.color = sub_cl;
				ps1a.style.backgroundColor = sub_bg;
			}

			if (el == 'prod1b') {
				ps1b.style.color = sub_cl_h;
				ps1b.style.backgroundColor = sub_bg_h;
			} else {
				ps1b.style.color = sub_cl;
				ps1b.style.backgroundColor = sub_bg;
			}

			ps1a.style.cursor = 'pointer';
			ps1b.style.cursor = 'pointer';
		} else {
			ps1a.style.top = "-60px";
			ps1a.style.backgroundColor = "transparent";
			ps1b.style.backgroundColor = "transparent";
			ps1a.style.color = "";
			ps1b.style.color = "";
			ps1a.style.cursor = 'default';
			ps1b.style.cursor = 'default';
		}
	}

	if ((el == 'comp')||(el == 'comp1')||(el == 'comp2')) {
		enable_menu(el.substring(0,4));
		cm1.style.cursor = 'pointer';
		cm2.style.cursor = 'pointer';

		if (el == 'comp1') {
			cm1.style.color = sub_cl_h;
			cm1.style.backgroundColor = sub_bg_h;
		} else {
			cm1.style.color = sub_cl;
			cm1.style.backgroundColor = sub_bg;
		}

		if (el == 'comp2') {
			cm2.style.color = sub_cl_h;
			cm2.style.backgroundColor = sub_bg_h;
		} else {
			cm2.style.color = sub_cl;
			cm2.style.backgroundColor = sub_bg;
		}
	}

	if ((el == 'cont')||(el == 'cont1')||(el == 'cont2')||(el == 'cont3')) {
		enable_menu(el.substring(0,4));
		ct1.style.cursor = 'pointer';
		ct2.style.cursor = 'pointer';
		ct3.style.cursor = 'pointer';

		if (el == 'cont1') {
			ct1.style.color = sub_cl_h;
			ct1.style.backgroundColor = sub_bg_h;
		} else {
			ct1.style.color = sub_cl;
			ct1.style.backgroundColor = sub_bg;
		}

		if (el == 'cont2') {
			ct2.style.color = sub_cl_h;
			ct2.style.backgroundColor = sub_bg_h;
		} else {
			ct2.style.color = sub_cl;
			ct2.style.backgroundColor = sub_bg;
		}

		if (el == 'cont3') {
			ct3.style.color = sub_cl_h;
			ct3.style.backgroundColor = sub_bg_h;
		} else {
			ct3.style.color = sub_cl;
			ct3.style.backgroundColor = sub_bg;
		}
	}

	if ((el == 'news')||(el == 'news1')||(el == 'news2')) {
		enable_menu(el.substring(0,4));
		nw1.style.cursor = 'pointer';
		nw2.style.cursor = 'pointer';

		if (el == 'news1') {
			nw1.style.color = sub_cl_h;
			nw1.style.backgroundColor = sub_bg_h;
		} else {
			nw1.style.color = sub_cl;
			nw1.style.backgroundColor = sub_bg;
		}

		if (el == 'news2') {
			nw2.style.color = sub_cl_h;
			nw2.style.backgroundColor = sub_bg_h;
		} else {
			nw2.style.color = sub_cl;
			nw2.style.backgroundColor = sub_bg;
		}
	}
}

function m_out() {
	disable_menus();
}

function startup() {
	document.getElementById('il').src = pic[0].src;
	document.getElementById('ic').src = pic[1].src;
	document.getElementById('ir').src = pic[2].src;
	document.getElementById('ib').src = pic[1].src;
	document.getElementById('desl').innerHTML = des[0];
	document.getElementById('desc').innerHTML = des[1];
	document.getElementById('desr').innerHTML = des[2];
}

function pop1() {
	clearTimeout(t);
	var info = arguments[0];
//	document.getElementById('box').innerHTML = info;
//	document.getElementById('box').style.visibility = "visible";
	if (info == 'MIDDLE') {
		document.getElementById('bbox').style.visibility = "visible";
		document.getElementById('cbox').style.visibility = "hidden";
		document.getElementById('lbox').style.visibility = "hidden";
		document.getElementById('rbox').style.visibility = "hidden";
		document.getElementById('hd2').innerHTML = 'datavision - screen shots - ' + des[(idx+1) % items];
		document.getElementById('desc').style.visibility = "hidden";
		document.getElementById('desl').style.visibility = "hidden";
		document.getElementById('desr').style.visibility = "hidden";

		document.getElementById('ccon').style.visibility = "hidden";
		document.getElementById('lcon').style.visibility = "hidden";
		document.getElementById('rcon').style.visibility = "hidden";
	}
	if ((info == 'LEFT')||(info == 'RIGHT')) {
		dir = info;
		document.getElementById('cbox').style.visibility = "visible";
		document.getElementById('bbox').style.visibility = "hidden";
		document.getElementById('lbox').style.visibility = "visible";
		document.getElementById('rbox').style.visibility = "visible";
		document.getElementById('desl').style.visibility = "visible";
		document.getElementById('hd2').innerHTML = 'datavision - screen shots';
		document.getElementById('desc').style.visibility = "visible";
		document.getElementById('desr').style.visibility = "visible";
		s = setTimeout("swap()",1000);
	} else {
		dir = 'NONE';
	}
}

function nobox() {
	t = setTimeout("nuff()",500);
	clearTimeout(s);
}

function nuff() {
//	document.getElementById('box').style.visibility = "visible";
	document.getElementById('cbox').style.visibility = "visible";
	document.getElementById('lbox').style.visibility = "visible";
	document.getElementById('rbox').style.visibility = "visible";

	document.getElementById('ccon').style.visibility = "visible";
	document.getElementById('lcon').style.visibility = "visible";
	document.getElementById('rcon').style.visibility = "visible";

	document.getElementById('bbox').style.visibility = "hidden";

	document.getElementById('desl').style.visibility = "visible";
	document.getElementById('hd2').innerHTML = 'datavision - screen shots';
	document.getElementById('desc').style.visibility = "visible";
	document.getElementById('desr').style.visibility = "visible";
}

function swap() {
//	document.getElementById('box').innerHTML = 'SWAP';
	if (dir == 'LEFT') {
		document.getElementById('il').src = pic[(idx+1) % items].src;
		document.getElementById('ic').src = pic[(idx+2) % items].src;
		document.getElementById('ir').src = pic[(idx+3) % items].src;
		document.getElementById('ib').src = pic[(idx+2) % items].src;
		idx = (idx+1) % items;
//		document.getElementById('box').innerHTML = 'SWAP:' + dir;
		s = setTimeout("swap()",1000);
	} else {
		document.getElementById('il').src = pic[(idx + items - 1) % items].src;
		document.getElementById('ic').src = pic[idx].src;
		document.getElementById('ir').src = pic[(idx+1) % items].src;
		document.getElementById('ib').src = pic[idx].src;
		idx = (idx+items-1) % items;
//		document.getElementById('box').innerHTML = 'SWAP:' + dir;
		s = setTimeout("swap()",1000);
	}
	document.getElementById('desl').innerHTML = des[idx];
	document.getElementById('desc').innerHTML = des[(idx+1) % items];
	document.getElementById('desr').innerHTML = des[(idx+2) % items];
}

function clear_form() {
	var d = document.enq_form;
	d.first.value = '';
	d.last.value = '';
	d.comp.value = '';
	d.loc.value = '';
	d.email.value = '';
	d.phone.value = '';
	d.info.value = '';
	return 1;
}

function set_headings() {
	document.getElementById('hm').style.color = fg;
	document.getElementById('hm').style.backgroundColor = bg;
	document.getElementById('ps').style.color = fg;
	document.getElementById('ps').style.backgroundColor = bg;
	document.getElementById('cm').style.color = fg;
	document.getElementById('cm').style.backgroundColor = bg;
	document.getElementById('ct').style.color = fg;
	document.getElementById('ct').style.backgroundColor = bg;
	document.getElementById('nw').style.color = fg;
	document.getElementById('nw').style.backgroundColor = bg;
	document.getElementById(arguments[0]).style.color = sfg;
	document.getElementById(arguments[0]).style.backgroundColor = sbg;
	return 1;
}

function set_start() {
	var head = arguments[0].substring(0,2);
	set_headings(head);
	if (arguments[0] == 'ps1b')
		startup();
	if (arguments[0] == 'ct2')
		clear_form();
	return 1;
}

function check_login() {
	var demo = document.log_form.demo;
	var pw = document.log_form.pw;
	var good_bord = '#666666';
	var bad_bord = '#FF0000';
	demo.style.borderColor = good_bord;
	pw.style.borderColor = good_bord;
	var OK = 1;

	demo.value = (demo.value).replace(/^\s*|\s*$/g,'');
	pw.value = (pw.value).replace(/^\s*|\s*$/g,'');

	if (demo.value == "") {
		demo.style.borderColor = bad_bord;
		var OK = 0;
	}

	if (pw.value == "") {
		pw.style.borderColor = bad_bord;
		var OK = 0;
	}

	document.getElementById('log_err').style.visibility = "hidden";

	if (OK == 1) {
		document.getElementById('log_err_js').style.visibility = "hidden";
		return true;
	} else {
		document.getElementById('log_err_js').style.visibility = "visible";
		return false;
	}
}

function check_form() {
	var first = document.enq_form.first;
	var last = document.enq_form.last;
	var comp = document.enq_form.comp;
	var loc = document.enq_form.loc;
	var email = document.enq_form.email;
	var phone = document.enq_form.phone;
	var info = document.enq_form.info;
	var good_bord = '#666666';
	var bad_bord = '#FF0000';
	var OK = 1;

	var pat_first = /[^a-zA-Z\-\ \']/;
	var pat_last  = /[^a-zA-Z\-\ \']/;
	var pat_comp  = /[^a-zA-Z0-9\-\_\.\ \']/;
	var pat_loc   = /[^a-zA-Z\-\.\ \']/;
	var pat_phone = /[^0-9\-\+\(\)\.\ ]/;
	var pat_email = /[^a-zA-Z0-9\-\_\.@]/;

	document.getElementById('enq_err').style.visibility = "hidden";

	first.style.borderColor = good_bord;
	last.style.borderColor = good_bord;
	comp.style.borderColor = good_bord;
	loc.style.borderColor = good_bord;
	email.style.borderColor = good_bord;
	phone.style.borderColor = good_bord;
	info.style.borderColor = good_bord;

	first.value = (first.value).replace(/^\s*|\s*$/g,'');
	last.value = (last.value).replace(/^\s*|\s*$/g,'');
	comp.value = (comp.value).replace(/^\s*|\s*$/g,'');
	loc.value = (loc.value).replace(/^\s*|\s*$/g,'');
	email.value = (email.value).replace(/^\s*|\s*$/g,'');
	phone.value = (phone.value).replace(/^\s*|\s*$/g,'');
	info.value = (info.value).replace(/^\s*|\s*$/g,'');

	if (first.value == '') {
		first.style.borderColor = bad_bord;
		OK=0;
	}
	if (last.value == '') {
		last.style.borderColor = bad_bord;
		OK=0;
	}
	if (comp.value == '') {
		comp.style.borderColor = bad_bord;
		OK=0;
	}
	if (loc.value == '') {
		loc.style.borderColor = bad_bord;
		OK=0;
	}
	if (email.value == '') {
		email.style.borderColor = bad_bord;
		OK=0;
	}
	if (phone.value == '') {
		phone.style.borderColor = bad_bord;
		OK=0;
	}
	if (info.value == '') {
		info.style.borderColor = bad_bord;
		OK=0;
	}

	if (pat_first.test(first.value) == 1) {
		first.style.borderColor = bad_bord;
		OK=0;
	}
	if (pat_last.test(last.value) == 1) {
		last.style.borderColor = bad_bord;
		OK=0;
	}
	if (pat_comp.test(comp.value) == 1) {
		comp.style.borderColor = bad_bord;
		OK=0;
	}
	if (pat_loc.test(loc.value) == 1) {
		loc.style.borderColor = bad_bord;
		OK=0;
	}

	if (pat_phone.test(phone.value) == 1) {
		phone.style.borderColor = bad_bord;
		OK=0;
	}

	if (pat_email.test(email.value) == 1) {
		email.style.borderColor = bad_bord;
		OK=0;
	} else {
		arr_at = email.value.split("@");
		count_at = arr_at.length;
		if (count_at != 2) {
			email.style.borderColor = bad_bord;
			OK = 0;
		} else { 
			if (arr_at[0].length < 1) {
				email.style.borderColor = bad_bord;
				OK = 0;
			} else if (arr_at[1].length < 4) {
				email.style.borderColor = bad_bord;
				OK = 0;
			} else {
				arr_dot = arr_at[1].split(".");
				count_dot = arr_dot.length;
				if (count_dot < 2) { 
					email.style.borderColor = bad_bord;
					OK = 0;
				} else {
					for (i=0;i<count_dot;i++) {
						if (arr_dot[i].length < 1) {  
							email.style.borderColor = bad_bord;
							OK = 0;
						}
					}
					if (arr_dot[count_dot - 1].length < 2) {
						email.style.borderColor = bad_bord;
						OK = 0;
					}
				}
			}
		}
	}

	if (OK == 1) {
		return true;
	} else {
		document.getElementById('enq_err').style.visibility = "visible";
		return false;
	}
}

function screens() {

	document.write('<div id=\"lbox\" class=\"box_s\" style=\"top:0px; left:0px; height:200px; width:200px; visibility:visible;\">');
	document.write('<img id=\"il\" src=\"images/white_single.gif\" alt=\"\" width=\"200\" height=\"200\"></div>');

	document.write('<div id=\"cbox\" class=\"box_s\" style=\"top:-204px; left:204px; height:200px; width:200px; visibility:visible;\">');
	document.write('<img id=\"ic\" src=\"images/white_single.gif\" alt=\"\" width=\"200\" height=\"200\"></div>');

	document.write('<div id=\"rbox\" class=\"box_s\" style=\"top:-408px; left:408px; height:200px; width:200px; visibility:visible;\">');
	document.write('<img id=\"ir\" src=\"images/white_single.gif\" alt=\"\" width=\"200\" height=\"200\"></div>');

	document.write('<div id=\"bbox\" class=\"box_s\" style=\"top:-612px; left:50px; height:500px; width:500px; visibility:hidden; border: 2px #FF0000 solid;\">');
	document.write('<img id=\"ib\" src=\"images/white_single.gif\" alt=\"\" width=\"500\" height=\"500\" onMouseOver=\"pop1(\'MIDDLE\')\" onMouseOut=\"nobox()\"></div>');

	document.write('<div id=\"desl\" class=\"des_s\" style=\"left:0px; top:-900px;\"></div>');
	document.write('<div id=\"desc\" class=\"des_s\" style=\"left:204px; top:-920px;\"></div>');
	document.write('<div id=\"desr\" class=\"des_s\" style=\"left:408px; top:-940px;\"></div>');

	document.write('<div id=\"lcon\" class=\"con_s\" style=\"top:-826px;  left:51px;\">');
	document.write('<img src=\"images/left1.gif\"  alt=\"scroll left\"  width=\"100\" height=\"50\" title=\"scroll left\" onMouseOver=\"pop1(\'LEFT\')\"   onMouseOut=\"nobox()\"></div>');

	document.write('<div id=\"ccon\" class=\"con_s\" style=\"top:-878px;  left:255px;\">');
	document.write('<img src=\"images/zoom1.gif\"  alt=\"scroll left\"  width=\"100\" height=\"50\" title=\"zoom centre image\" onMouseOver=\"pop1(\'MIDDLE\')\"   onMouseOut=\"nobox()\"></div>');

	document.write('<div id=\"rcon\" class=\"con_s\" style=\"top:-930px; left:459px;\">');
	document.write('<img src=\"images/right1.gif\" alt=\"scroll right\" width=\"100\" height=\"50\" title=\"scroll right\" onMouseOver=\"pop1(\'RIGHT\')\" onMouseOut=\"nobox()\"></div>');

}

function menu_bar() {

	document.write('<div style=\"position:relative; top:0px; left:0px;\">');
	document.write('<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr height=\"20\" id=\"tr_hd\">');

	document.write('<td width=\"20%\" id=\"hm\" align=\"center\" class=\"TextW\" onmouseover=\"m_over(\'home\');\" onmouseout=\"m_out();\" onclick=\"window.location.assign(\'index.php\');\" style=\"cursor:pointer;\">Home</td>');
	document.write('<td width=\"20%\" id=\"ps\" align=\"center\" class=\"TextW\" onmouseover=\"m_over(\'prod\');\" onmouseout=\"m_out();\" style=\"cursor:default;\">Products&nbsp;&amp;&nbsp;Services</td>');
	document.write('<td width=\"20%\" id=\"cm\" align=\"center\" class=\"TextW\" onmouseover=\"m_over(\'comp\');\" onmouseout=\"m_out();\" style=\"cursor:default;\">Company</td>');
	document.write('<td width=\"20%\" id=\"nw\" align=\"center\" class=\"TextW\" onmouseover=\"m_over(\'news\');\" onmouseout=\"m_out();\" style=\"cursor:default;\">News</td>');
	document.write('<td width=\"20%\" id=\"ct\" align=\"center\" class=\"TextW\" onmouseover=\"m_over(\'cont\');\" onmouseout=\"m_out();\" style=\"cursor:default;\">Contact</td>');
 
	document.write('</tr></table>');
	document.write('</div>');
 
	document.write('<div id=\"ps1\"  class=\"men_s\" style=\"top:0px;    left:152px; width:152px;\" onmouseover=\"m_over(\'prod1\');\"  onmouseout=\"m_out();\" style=\"cursor:default;\">Datavision&nbsp;&nbsp;&nbsp;&nbsp;></div>');
	document.write('<div id=\"ps2\"  class=\"men_s\" style=\"top:0px;    left:152px; width:152px;\" onmouseover=\"m_over(\'prod2\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'assa.php\');\">ASSA</div>');
	document.write('<div id=\"ps3\"  class=\"men_s\" style=\"top:0px;    left:152px; width:152px;\" onmouseover=\"m_over(\'prod3\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'services.php\');\">Services</div>');
	document.write('<div id=\"ps1a\" class=\"men_s\" style=\"top:-60px;  left:304px; width:152px;\" onmouseover=\"m_over(\'prod1a\');\" onmouseout=\"m_out();\" onclick=\"window.location.assign(\'dv.php\');\">Description</div>');
	document.write('<div id=\"ps1b\" class=\"men_s\" style=\"top:-60px;  left:304px; width:152px;\" onmouseover=\"m_over(\'prod1b\');\" onmouseout=\"m_out();\" onclick=\"window.location.assign(\'screens.php\');\">Screen Shots</div>');
	document.write('<div id=\"cm1\"  class=\"men_s\" style=\"top:-100px; left:304px; width:152px;\" onmouseover=\"m_over(\'comp1\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'about.php\');\">About Us</div>');
	document.write('<div id=\"cm2\"  class=\"men_s\" style=\"top:-100px; left:304px; width:152px;\" onmouseover=\"m_over(\'comp2\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'management.php\');\">Management</div>');
	document.write('<div id=\"nw1\"  class=\"men_s\" style=\"top:-140px; left:456px; width:152px;\" onmouseover=\"m_over(\'news1\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'events.php\');\">Events</div>');
	document.write('<div id=\"nw2\"  class=\"men_s\" style=\"top:-140px; left:456px; width:152px;\" onmouseover=\"m_over(\'news2\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'releases.php\');\">Datavision Releases</div>');
	document.write('<div id=\"ct1\"  class=\"men_s\" style=\"top:-180px; left:608px; width:152px;\" onmouseover=\"m_over(\'cont1\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'contact.php\');\">Contact Us</div>');
	document.write('<div id=\"ct2\"  class=\"men_s\" style=\"top:-180px; left:608px; width:152px;\" onmouseover=\"m_over(\'cont2\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'enquiry.php\');\">Enquiry</div>');
	document.write('<div id=\"ct3\"  class=\"men_s\" style=\"top:-180px; left:608px; width:152px;\" onmouseover=\"m_over(\'cont3\');\"  onmouseout=\"m_out();\" onclick=\"window.location.assign(\'login.php\');\">Login</div>');

}

function limit_chars(Object, MaxLen) {
	return (Object.value.length <= MaxLen);
}

function new_page() {
	document.loop_form.key.value = arguments[0];
	document.loop_form.submit();
}

function loop_page() {
	the_key = arguments[0];
	var tout = setTimeout("new_page(the_key)",15000);
}

