var allImages ="  <table>" +
"  <tr>" +
"    <td>" +	
"	 </td>" +
"    <td>" +		
"	   <img src=\"CompanyImages/AQ&DML.jpg\" width=\"60\" height=\"60\"  />" +
"    <td>" +
"	   <img src=\"CompanyImages/logo.png\" width=\"100\" height=\"30\" />" +	
"	 </td>" +
"    <td>" +	
"	 </td>" +
"  <tr>" +
"    <td>" +
"	   <img src=\"CompanyImages/Marena.jpg\" width=\"60\" height=\"40\"  />" +	
"	 </td>" +
"	 <td>" +
"    </td>" +	
"	 <td>" +
"	 </td>" +
"	 <td>" +
"	   <img src=\"CompanyImages/Kelocote.jpg\" width=\"100\" height=\"30\"  />" +
"	 </td>" +
"  </tr>" +
"  <tr>" +
"    <td>" +
"	   <img src=\"CompanyImages/NEOVA_LOGO.jpg\" width=\"80\" height=\"30\"  />" +
"	 </td>" +
"	 <td>" +
"    </td>" +	
"	 <td>" +
"	 </td>" +
"	 <td>" +
"	   <img src=\"CompanyImages/Prevelle.jpg\" width=\"100\" height=\"30\" />" +
"	 </td>" +
"  </tr>" +
"  <tr>" +
"    <td>" +

"	 </td>" +
"	 <td>" +
"      <img src=\"CompanyImages/QSS.jpg\" width=\"100\" height=\"30\"  />" +
"    </td>" +	

"	 <td>" +
"	   <img src=\"CompanyImages/Siax.jpg\" width=\"100\" height=\"45\" />" +
"	 </td>" +
"	 <td>" +

"	 </td>" +
"  </tr>" +
" </table>";

var sp ="&nbsp;&nbsp;&nbsp;&nbsp;";
function sendData()
{

	var idElement=document.getElementById('id').value;
	var pwdElement=document.getElementById('pwd').value;
	//alert(pwdElement + idElement);
	if ((idElement == "") || (pwdElement == ""))
	{
		alert('Id or Pwd cannot be empty');
		return;
	}
	window.location = "productPage.html?" + idElement + "|" + pwdElement;
	return;
	var packed="";
	for (i=0; (i < idElement.length); i++)
	{
		packed += escape(idElement[i]);
	}
	packed += "|";
	for (i=0; (i < pwdElement.length); i++)
	{
		packed += escape(pwdElement[i]);
	}
	//alert(packed);
	window.location = "productPage.html?" + packed;
}
	
function content1Click()
{
	if (document.body){
		document.getElementById('page').className="aboutus"
	}
	var myContent="";
    document.getElementById("content").innerHTML = myContent;	
}
function content2Click()
{
	if (document.body){
		document.getElementById('page').className="ourservice"
	}
	var myContent="";
    document.getElementById("content").innerHTML = myContent;		
}
function content3Click()
{
	if (document.body){
		document.getElementById('page').className="categoryinvolving"
	}
	var myContent="";
    document.getElementById("content").innerHTML = myContent;		
}
function content4Click()
{
	if (document.body){
		document.getElementById('page').className="contactus"
	}
	var myContent="";
	myContent=	'<div id="contactForm">' +
	'<form name="input" action="sendEmail.asp" method="get">'+
    '<br/><br/><table ><tr>'+	
    '<td>Subject</td><td><input type="text" name="subject" /></td>'+
    '</tr><tr>'+  	
	'<td>Name</td><td><input type="text" name="name" /></td>'+ 
    '</tr><tr>'+
	'<td>Email</td><td><input type="text" name="email" /></td>'+
    '</tr><tr>'+	
	'<td>Phone</td><td><input type="text" name="phone" /></td>'+ 
	'</tr><tr>'+
	'<td colspan="2">Questions or Comments</td>' +
	'</tr><tr>' +
	'<td colspan="2"><textarea cols="50" rows="3" name="question"></textarea><input type="submit" value="Submit" /></td>'+ 
    '</tr></table>'+ 	
    '</form></div>'+ 
    '<div id="contactLower">'+      
    'Main Office:<br/>Unit 2010, 20/F, Wayson Comm  Bldg,<br/>'+ 
    '                                      No.28 Connaught Road West,  Hong Kong'+ 
    ' </br>Tel: (852) 2547 5633'+ 
    '                     Fax:(852) 2819 8374</br></br>'+ 
    '   Sales Office:<br/>Unit 14, 1/F, Wayson Comm Bldg,</br>'+ 
    '                                       No.28 Connaught Road West,  Hong Kong'+ 
    '<br/>Tel: (852) 3590 6908'+ 
    '<br/>Email: <a href="mailto:cs@hongwo.com.hk">cs@hongwo.com.hk</a>'+ 
    '</div>';
    document.getElementById("content").innerHTML = myContent;
}

function content5Click()
{
	if (document.body){
		document.getElementById('page').className="request"
	}
	var myContent='<div id="requestAccount" >'+
    '<br/><br/>Please fill in the following information and we will email you the id and password:' + 
	'<form  action="sendPassword.asp" method="get" >'+
    '<table >' +  	
	'<td>Name*</div></td><td><input type="text" name="name" /></td>'+ 
    '</tr><tr>'+
	'<td>Company/Clinic</td><td><input type="text" name="clinic" /></td>'+ 
    '</tr><tr>'+
	'<td>Email*</td><td><input type="text" name="email" /></td>'+
    '</tr><tr>'+	
	'<td>Phone</td><td><input type="text" name="phone" /></td>'+ 
	'</tr><tr><td>* mandatory input</td></tr>' +
	'<tr>' +
    '<td><input type="submit" value="Submit"/></td>'+
    '</tr></table>'+ 	
    '</form>'+ 
    '</div>';
    document.getElementById("content").innerHTML = myContent;
}
function validateEntry()
{
	var nameElement=document.getElementById('name').value;
	var emailElement=document.getElementById('email').value;
	alert(nameElement + emailElement);
	if ((nameElement == "") || (emailElement == ""))
	{
		alert('Name or Email address cannot be empty');
		return false;
	}
	return true;

}	
function hideContent1() 
{ 
	if (document.getElementById) 
	{ // DOM3 = IE5, NS6 
		document.getElementById('content1').style.visibility = 'hidden'; 
	} 
	else 
	{ 
		if (document.layers) { // Netscape 4 
			document.hideShow.visibility = 'hidden'; 
		} 
		else { // IE 4 
			document.all.hideShow.style.visibility = 'hidden'; 
		} 
	} 
} 

function showContent1() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('content1').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideShow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideShow.style.visibility = 'visible'; 
} 
} 
} 
function hideContent1() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('content1').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideShow.visibility = 'hidden'; 
} 
else { // IE 4 
document.all.hideShow.style.visibility = 'hidden'; 
} 
} 
} 

function showContent2() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('content2').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideShow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideShow.style.visibility = 'visible'; 
} 
} 
}

function hideContent2() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('content2').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideShow.visibility = 'hidden'; 
} 
else { // IE 4 
document.all.hideShow.style.visibility = 'hidden'; 
} 
} 
}  

/**
*
*  URL encode / decode
*  http://www.webtoolkit.info/
*
**/
 
var Url = {
 
	// public method for url encoding
	encode : function (string) {
		return escape(this._utf8_encode(string));
	},
 
	// public method for url decoding
	decode : function (string) {
		return this._utf8_decode(unescape(string));
	},
 
	// private method for UTF-8 encoding
	_utf8_encode : function (string) {
		string = string.replace(/\r\n/g,"\n");
		var utftext = "";
 
		for (var n = 0; n < string.length; n++) {
 
			var c = string.charCodeAt(n);
 
			if (c < 128) {
				utftext += String.fromCharCode(c);
			}
			else if((c > 127) && (c < 2048)) {
				utftext += String.fromCharCode((c >> 6) | 192);
				utftext += String.fromCharCode((c & 63) | 128);
			}
			else {
				utftext += String.fromCharCode((c >> 12) | 224);
				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
				utftext += String.fromCharCode((c & 63) | 128);
			}
 
		}
 
		return utftext;
	},
 
	// private method for UTF-8 decoding
	_utf8_decode : function (utftext) {
		var string = "";
		var i = 0;
		var c = c1 = c2 = 0;
 
		while ( i < utftext.length ) {
 
			c = utftext.charCodeAt(i);
 
			if (c < 128) {
				string += String.fromCharCode(c);
				i++;
			}
			else if((c > 191) && (c < 224)) {
				c2 = utftext.charCodeAt(i+1);
				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
				i += 2;
			}
			else {
				c2 = utftext.charCodeAt(i+1);
				c3 = utftext.charCodeAt(i+2);
				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
				i += 3;
			}
 
		}
 
		return string;
	}
 
}
