//Standard site functions
function fnChangeImage(Obj, Img){
	Obj.src = '../images/'+Img;
}

function fnSubmitForm(Obj1, IPValue){
		Obj1.mode.value = IPValue;
		Obj1.submit();
}

function fnSubmitItem(obj){
	var i
	for (i=0; i<document.all.item(obj).options.length; i++){
			document.all.item(obj).options[i].selected = true
	}
	
	return true;
}

function fnLogin(){
	if (document.getElementById('signin').style.display == 'none'){
		document.getElementById('signin').style.display = 'block';
		document.getElementById('txtUID').focus();
	}else{
		document.getElementById('signin').style.display = 'none';
	}
}

function fnBrandRedirect(brandid){
	document.location="/perfect/"+brandid+"/form.html"
}

function fnCategoryRedirect(catid){
	document.location="/perfect/"+catid+"/form.html"
}


function fnProfileSubmitForm(IPValue){
		document.frmProfile.mode.value = IPValue;
		document.frmProfile.submit();
}

function fnCheckKeyPress(Obj, Obj1, IPValue){
	if (Obj == 13){
		Obj1.mode.value = IPValue;
		Obj1.submit();
	}
}

function fnStatusChange(Obj){
	window.status = Obj
}

function fbreakout(obj){
	if (window.top!=window.self) 
	{
		window.top.location=obj
	}
}

function addCatItem(obj, obj1, obj2, obj3){
	var i
	
	for (i=0; i<document.all.item(obj1).options.length; i++){
		if (document.all.item(obj1).options[i].selected==true){
			addNewItem(obj, obj3, obj2, document.all.item(obj1).options[i].value, document.all.item(obj1).options[i].text)
		}
	}	
}

function addNewItem(obj, obj1, obj2, id, name){
	var i
	addOption = true
	for (i=0; i<document.all.item(obj2).options.length; i++){
		if(document.all.item(obj2).options[i].value == id){
			addOption = false
		}
	}
	
	if (addOption == true){
		document.all.item(obj2).options[document.all.item(obj2).options.length] = new Option(name, id)

		if (obj == 'event' || obj == 'categories'){
			if (document.all.item(obj2).options.length == 1){
				document.all.item(obj1).value = id
			}else{
				document.all.item(obj1).value = document.all.item(obj1).value +','+id
			}
		}
	}
}

function removeCatItem(obj, obj1, obj2){
	var i
	var oElements
	var CatID
	var SelCat
	for (i=0; i<document.all.item(obj2).options.length; i++){
		if (document.all.item(obj2).options[i].selected==true){
			CatID = document.all.item(obj2).options[i].value
			document.all.item(obj2).options.remove(i)
		}
	}
	
	if (obj == 'event' || obj == 'categories'){
		for (i=0; i<document.all.item(obj2).options.length; i++){
			document.all.item(obj2).options[i].selected = true
		}
		
		oElements = document.all.item(obj2).value.split(",");
		document.all.item(obj1).value = "";
		for (i=0;i<oElements.length;i++){
			if (oElements.length == 1){
				document.all.item(obj1).value = oElements[i]
			}else{
				document.all.item(obj1).value = document.all.item(obj1).value +','+oElements[i]
			}
		}
	}
	
	if (obj == 'request'){
		document.location.replace("default.asp?cid=7&rid="+CatID)
	}
}

function fnValidateRequest(obj){
	if (document.getElementById('txtFirstName').value == ""){
		alert("Please provide a first name");
		document.getElementById('txtFirstName').focus();
		return false;
	}
	
	if (document.getElementById('txtLastName').value == ""){
		alert("Please provide a last name");
		document.getElementById('txtLastName').focus();
		return false;
	}
	
	if (document.getElementById('txtContactEmail').value == ""){
		alert("Please provide a contact email address");
		document.getElementById('txtContactEmail').focus();
		return false;
	}
	
	var addr = document.getElementById('txtContactEmail').value
	var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
	for (i=0; i<invalidChars.length; i++) {
	   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
		  alert('The email address contains invalid characters');
		  return false;
	   }
	}
	
	for (i=0; i<addr.length; i++) {
	   if (addr.charCodeAt(i)>127) {
		  alert("The email address contains non ascii characters.");
		  return false;
	   }
	}
	
	var atPos = addr.indexOf('@',0);
	if (atPos == -1) {
	   alert('The email address must contain an @');
	   return false;
	}
	if (atPos == 0) {
	   alert('The email address must not start with @');
	   return false;
	}
	if (addr.indexOf('@', atPos + 1) > - 1) {
	   alert('The email address must contain only one @');
	   return false;
	}
	if (addr.indexOf('.', atPos) == -1) {
	   alert('The email address must contain a period in the domain name');
	   return false;
	}
	if (addr.indexOf('@.',0) != -1) {
	   alert('The period must not immediately follow @ in email address');
	   return false;
	}
	if (addr.indexOf('.@',0) != -1){
	   alert('The period must not immediately precede @ in email address');
	   return false;
	}
	if (addr.indexOf('..',0) != -1) {
	  alert('The two periods must not be adjacent in email address');
	   return false;
	}
	
	var suffix = addr.substring(addr.lastIndexOf('.')+1);
	if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
	   alert('The primary domain in email address is invalid');
	   return false;
	}	
	
	if (document.getElementById('cboLocal').value == ""){
		alert("Please select your location");
		document.getElementById('cboLocal').focus();
		return false;
	}
	
	if (document.getElementById('cboProdSel').value == ""){
		alert("Please ensure that you have at least one product category you would be interested in.");
		document.getElementById('cboProdSel').focus();
		return false;
	}
}

function fnFPwdValidate(obj){
	if (document.getElementById('txtContactEmail').value == ""){
		alert("Please provide a contact email address");
		document.getElementById('txtContactEmail').focus();
		return false;
	}
	
	var addr = document.getElementById('txtContactEmail').value
	var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
	for (i=0; i<invalidChars.length; i++) {
	   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
		  alert('The email address contains invalid characters');
		  return false;
	   }
	}
	
	for (i=0; i<addr.length; i++) {
	   if (addr.charCodeAt(i)>127) {
		  alert("The email address contains non ascii characters.");
		  return false;
	   }
	}
	
	var atPos = addr.indexOf('@',0);
	if (atPos == -1) {
	   alert('The email address must contain an @');
	   return false;
	}
	if (atPos == 0) {
	   alert('The email address must not start with @');
	   return false;
	}
	if (addr.indexOf('@', atPos + 1) > - 1) {
	   alert('The email address must contain only one @');
	   return false;
	}
	if (addr.indexOf('.', atPos) == -1) {
	   alert('The email address must contain a period in the domain name');
	   return false;
	}
	if (addr.indexOf('@.',0) != -1) {
	   alert('The period must not immediately follow @ in email address');
	   return false;
	}
	if (addr.indexOf('.@',0) != -1){
	   alert('The period must not immediately precede @ in email address');
	   return false;
	}
	if (addr.indexOf('..',0) != -1) {
	  alert('The two periods must not be adjacent in email address');
	   return false;
	}
	
	var suffix = addr.substring(addr.lastIndexOf('.')+1);
	if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
	   alert('The primary domain in email address is invalid');
	   return false;
	}
}

function fnValidatePayment(){
	if (document.getElementById('txtTitle').value == ""){
		alert("Please provide your salutation.");
		ClickPaymentB('basket','pdetail','payment','baskettab','pdetailtab','paymenttab');
		document.getElementById('txtTitle').focus();
		return false;
	}
	
	if (document.getElementById('txtFirstName').value == ""){
		alert("Please provide your first name.");
		ClickPaymentB('basket','pdetail','payment','baskettab','pdetailtab','paymenttab')
		document.getElementById('txtFirstName').focus();
		return false;
	}
	
	if (document.getElementById('txtLastName').value == ""){
		alert("Please provide your last name.");
		ClickPaymentB('basket','pdetail','payment','baskettab','pdetailtab','paymenttab')
		document.getElementById('txtLastName').focus();
		return false;
	}
	
	if (document.getElementById('txtEmail').value == ""){
		alert("Please provide your email address.");
		ClickPaymentB('basket','pdetail','payment','baskettab','pdetailtab','paymenttab')
		document.getElementById('txtEmail').focus();
		return false;
	}
	
	var addr = document.getElementById('txtEmail').value
	var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
	for (i=0; i<invalidChars.length; i++) {
	   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
		  alert('The email address contains invalid characters');
		  return false;
	   }
	}
	
	for (i=0; i<addr.length; i++) {
	   if (addr.charCodeAt(i)>127) {
		  alert("The email address contains non ascii characters.");
		  return false;
	   }
	}
	
	var atPos = addr.indexOf('@',0);
	if (atPos == -1) {
	   alert('The email address must contain an @');
	   return false;
	}
	if (atPos == 0) {
	   alert('The email address must not start with @');
	   return false;
	}
	if (addr.indexOf('@', atPos + 1) > - 1) {
	   alert('The email address must contain only one @');
	   return false;
	}
	if (addr.indexOf('.', atPos) == -1) {
	   alert('The email address must contain a period in the domain name');
	   return false;
	}
	if (addr.indexOf('@.',0) != -1) {
	   alert('The period must not immediately follow @ in email address');
	   return false;
	}
	if (addr.indexOf('.@',0) != -1){
	   alert('The period must not immediately precede @ in email address');
	   return false;
	}
	if (addr.indexOf('..',0) != -1) {
	  alert('The two periods must not be adjacent in email address');
	   return false;
	}
	
	var suffix = addr.substring(addr.lastIndexOf('.')+1);
	if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
	   alert('The primary domain in email address is invalid');
	   return false;
	}
	
	if (document.getElementById('txtContactNo').value == ""){
		alert("Please provide your contact number.");
		ClickPaymentB('basket','pdetail','payment','baskettab','pdetailtab','paymenttab')
		document.getElementById('txtContactNo').focus();
		return false;
	}
	
	if (document.getElementById('txtAddress1').value == "" || document.getElementById('txtAddress2').value == "" || document.getElementById('txtAddress3').value == "" || document.getElementById('txtAddress4').value == ""){
		alert("Please provide all the relevant delivery details.");
		ClickPaymentB('basket','pdetail','payment','baskettab','pdetailtab','paymenttab')
		document.getElementById('txtAddress1').focus();
		return false;
	}
	
	return true;
}

function fnValidateDetails(){
	if (document.getElementById('txtTitle').value == ""){
		alert("Please provide your salutation.");
		ClickPaymentA('pdetail','delivery','history','pdetailtab','deliverytab','historytab');
		document.getElementById('txtTitle').focus();
		return false;
	}
	
	if (document.getElementById('txtFirstName').value == ""){
		alert("Please provide your first name.");
		ClickPaymentA('pdetail','delivery','history','pdetailtab','deliverytab','historytab')
		document.getElementById('txtFirstName').focus();
		return false;
	}
	
	if (document.getElementById('txtLastName').value == ""){
		alert("Please provide your last name.");
		ClickPaymentA('pdetail','delivery','history','pdetailtab','deliverytab','historytab')
		document.getElementById('txtLastName').focus();
		return false;
	}
	
	if (document.getElementById('txtEmail').value == ""){
		alert("Please provide your email address.");
		ClickPaymentA('pdetail','delivery','history','pdetailtab','deliverytab','historytab')
		document.getElementById('txtEmail').focus();
		return false;
	}
	
	var addr = document.getElementById('txtEmail').value
	var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
	for (i=0; i<invalidChars.length; i++) {
	   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
		  alert('The email address contains invalid characters');
		  return false;
	   }
	}
	
	for (i=0; i<addr.length; i++) {
	   if (addr.charCodeAt(i)>127) {
		  alert("The email address contains non ascii characters.");
		  return false;
	   }
	}
	
	var atPos = addr.indexOf('@',0);
	if (atPos == -1) {
	   alert('The email address must contain an @');
	   return false;
	}
	if (atPos == 0) {
	   alert('The email address must not start with @');
	   return false;
	}
	if (addr.indexOf('@', atPos + 1) > - 1) {
	   alert('The email address must contain only one @');
	   return false;
	}
	if (addr.indexOf('.', atPos) == -1) {
	   alert('The email address must contain a period in the domain name');
	   return false;
	}
	if (addr.indexOf('@.',0) != -1) {
	   alert('The period must not immediately follow @ in email address');
	   return false;
	}
	if (addr.indexOf('.@',0) != -1){
	   alert('The period must not immediately precede @ in email address');
	   return false;
	}
	if (addr.indexOf('..',0) != -1) {
	  alert('The two periods must not be adjacent in email address');
	   return false;
	}
	
	var suffix = addr.substring(addr.lastIndexOf('.')+1);
	if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
	   alert('The primary domain in email address is invalid');
	   return false;
	}
	
	if (document.getElementById('txtContactNo').value == ""){
		alert("Please provide your contact number.");
		ClickPaymentA('pdetail','delivery','history','pdetailtab','deliverytab','historytab')
		document.getElementById('txtContactNo').focus();
		return false;
	}
	
	if (document.getElementById('txtAddress1').value == "" || document.getElementById('txtAddress2').value == "" || document.getElementById('txtAddress3').value == "" || document.getElementById('txtAddress4').value == ""){
		alert("Please provide all the relevant delivery details.");
		ClickPaymentB('pdetail','delivery','history','pdetailtab','deliverytab','historytab')
		document.getElementById('txtAddress1').focus();
		return false;
	}
	
	return true;
}

function fnRegValidate(obj){
	if (document.getElementById('txtCompanyName').value == ""){
		alert("Please provide your company name");
		document.getElementById('txtCompanyName').focus();
		return false;
	}
	
	if (document.getElementById('txtContactPerson').value == ""){
		alert("Please provide a contact persons name");
		document.getElementById('txtContactPerson').focus();
		return false;
	}
	
	if (document.getElementById('txtContactNo').value == ""){
		alert("Please provide a contact persons number");
		document.getElementById('txtContactNo').focus();
		return false;
	}
	
	if (document.getElementById('txtContactEmail').value == ""){
		alert("Please provide a contact email address");
		document.getElementById('txtContactEmail').focus();
		return false;
	}
	
	var addr = document.getElementById('txtContactEmail').value
	var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
	for (i=0; i<invalidChars.length; i++) {
	   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
		  alert('The email address contains invalid characters');
		  return false;
	   }
	}
	
	for (i=0; i<addr.length; i++) {
	   if (addr.charCodeAt(i)>127) {
		  alert("The email address contains non ascii characters.");
		  return false;
	   }
	}
	
	var atPos = addr.indexOf('@',0);
	if (atPos == -1) {
	   alert('The email address must contain an @');
	   return false;
	}
	if (atPos == 0) {
	   alert('The email address must not start with @');
	   return false;
	}
	if (addr.indexOf('@', atPos + 1) > - 1) {
	   alert('The email address must contain only one @');
	   return false;
	}
	if (addr.indexOf('.', atPos) == -1) {
	   alert('The email address must contain a period in the domain name');
	   return false;
	}
	if (addr.indexOf('@.',0) != -1) {
	   alert('The period must not immediately follow @ in email address');
	   return false;
	}
	if (addr.indexOf('.@',0) != -1){
	   alert('The period must not immediately precede @ in email address');
	   return false;
	}
	if (addr.indexOf('..',0) != -1) {
	  alert('The two periods must not be adjacent in email address');
	   return false;
	}
	
	var suffix = addr.substring(addr.lastIndexOf('.')+1);
	if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
	   alert('The primary domain in email address is invalid');
	   return false;
	}	
}

function fnAddfavourite(){
   if (document.all){
      window.external.AddFavorite
      ("http://wireddev","Perfectform - Nutritional Supplementation")
   }
}

function fnPreload(){ 
  var args = fnPreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

// onMouseOver="javascript:ShowAdBox('+oDetail[0]+',event.clientX,event.clientY)" onMouseOut="HideAdBox()"

function fnLoadAccount(){
	var iTotal
	
	document.getElementById('bsktinfo').style.display = 'block'
	
	rspText = document.getElementById('account').value;

	if (rspText != ""){
		sDetail = '<table width="150" cellpadding="2" cellspacing="0">'
		sDetail = sDetail + '<tr><td class="account-heading" width="100" align="left">Product</td><td class="account-heading" width="50" align="left">Qty</td></tr>'
		iTotal = 0
		oProducts = rspText.split("|");
		for (i=0;i<oProducts.length;i++){
			oDetail = oProducts[i].split(":");
			sFunction = "makeRequest('/process.asp?id="+oDetail[0]+"&action=sum&amt='+this.value)"
			sDetail = sDetail + '<tr><td class="account-body" valign="bottom"><a href="/basket-info.asp?pid='+oDetail[0]+'" rel="lightbox1"><img src="/images/helpico.gif"" valign="bottom" style="cursor: help;" border="0"></a>&nbsp;&nbsp;'+oDetail[2]+'</td><td valign="top" class="account-body"><select name="qty" id="qty" style="width: 85%;" onChange="'+sFunction+'">'
			iCount = (oDetail[3]>10) ? 10 : oDetail[3]
			for (j=0;j<=iCount;j++){
					if (j == oDetail[1]){
						sDetail = sDetail + '<option value='+j+' selected>'+j+'</option>'
					}else{
						sDetail = sDetail + '<option value='+j+'>'+j+'</option>'
					}
			}
			iSubTotal = (oDetail[1]*oDetail[4])
								
			iTotal = iTotal + iSubTotal
			sDetail = sDetail + '</select></td></tr>'
			//sDetail = sDetail + '<input type="hidden" name="info'+oDetail[0]+'" value="' + oDetail[5] + '">'
			sDetail = sDetail + '<tr><td align="center" colspan="2"><hr size="1" width="85%"></td></tr>'
		}
		sTotal = iTotal.toString();
		oAmount = sTotal.split(".");
		if (oAmount.length > 1){
			if (oAmount[1].length == 1){sTotal = sTotal+'0'};
		}else{
			sTotal = sTotal+'.00'
		}
		
		sDetail = sDetail + '<tr><td class="account-body"><b>Total</b></td><td colspan="2" class="account-body"><b>R&nbsp;'+Math.round(sTotal)+'</b></td></tr>'
		
		sDetail = sDetail + '</table>'
		
		document.getElementById('bsktaccount').innerHTML = sDetail
	}else{
		document.getElementById('bsktinfo').style.display = 'none'
	}
}

function ClickA(ele1,ele2,ele3,tab1,tab2,tab3){	
	document.all.item(ele1).style.display = 'block';
	document.all.item(ele2).style.display = 'none';
	document.all.item(ele3).style.display = 'none';
	document.all.item(tab1).style.display = 'block';
	document.all.item(tab2).style.display = 'none';
	document.all.item(tab3).style.display = 'none';
}

function ClickPaymentA(ele1,ele2,ele3,tab1,tab2,tab3){	
	document.all.item(ele1).style.display = 'block';
	document.all.item(ele2).style.display = 'none';
	document.all.item(ele3).style.display = 'none';
	document.all.item(tab1).style.display = 'block';
	document.all.item(tab2).style.display = 'none';
	document.all.item(tab3).style.display = 'none';
	document.getElementById('buttonB').style.display = 'none';
	document.getElementById('buttonA').style.display = 'block';
	document.getElementById('buttonC').style.display = 'none';
}


function ClickB(ele1,ele2,ele3,tab1,tab2,tab3){
	document.all.item(ele1).style.display = 'none';
	document.all.item(ele2).style.display = 'block';
	document.all.item(ele3).style.display = 'none';
	document.all.item(tab1).style.display = 'none';
	document.all.item(tab2).style.display = 'block';
	document.all.item(tab3).style.display = 'none';
}

function ClickPaymentB(ele1,ele2,ele3,tab1,tab2,tab3){
	document.all.item(ele1).style.display = 'none';
	document.all.item(ele2).style.display = 'block';
	document.all.item(ele3).style.display = 'none';
	document.all.item(tab1).style.display = 'none';
	document.all.item(tab2).style.display = 'block';
	document.all.item(tab3).style.display = 'none';
	document.getElementById('buttonB').style.display = 'block';
	document.getElementById('buttonA').style.display = 'none';
	document.getElementById('buttonC').style.display = 'none';
}

function ClickC(ele1,ele2,ele3,tab1,tab2,tab3){
	document.all.item(ele1).style.display = 'none';
	document.all.item(ele2).style.display = 'none';
	document.all.item(ele3).style.display = 'block';
	document.all.item(tab1).style.display = 'none';
	document.all.item(tab2).style.display = 'none';
	document.all.item(tab3).style.display = 'block';
}

function ClickPaymentC(ele1,ele2,ele3,tab1,tab2,tab3){
	document.all.item(ele1).style.display = 'none';
	document.all.item(ele2).style.display = 'none';
	document.all.item(ele3).style.display = 'block';
	document.all.item(tab1).style.display = 'none';
	document.all.item(tab2).style.display = 'none';
	document.all.item(tab3).style.display = 'block';
	document.getElementById('buttonB').style.display = 'none';
	document.getElementById('buttonA').style.display = 'none';
	document.getElementById('buttonC').style.display = 'block';
}

function fnShowLogin(){
	if (document.getElementById('txtAccount').checked == true){
		document.getElementById('login').style.display = 'block';
		document.getElementById('txtUserName').value = document.getElementById('txtEmail').value;
	}else{
		document.getElementById('login').style.display = 'none';
		document.getElementById('txtUserName').value = "";
	}
}

function fnLoadTitle(obj){
	document.getElementById('TitleText').value = obj
}

function fnShowProduct(obj){
	if (document.getElementById('prodvis'+obj).style.display == 'none'){
		document.getElementById('prodvis'+obj).style.display = 'block';
	}else{
		document.getElementById('prodvis'+obj).style.display = 'none';
	}
}

function HideAdBox()
{
	document.getElementById("myAdBox").style.display="none";
	document.getElementById("myAdBox").innerHTML="";
}

function ShowAdBox(pid, xx, yy)
{	
	var HTML;
	
	HTML = "<span class='prodheading' align='center'>Product Information</span><br><br>"
	
	if (document.getElementById("myAdBox").style.display=="none")
	{
		if (HTML!='')
		{	
			if(HTML==null){HTML="Perfectform - Nutritional Supplementation"}		
			HTML = HTML + "Product Info: "+ document.getElementById('info'+pid).value
			document.getElementById("myAdBox").innerHTML = HTML;
			
			if (xx < 460){
				document.getElementById("myAdBox").style.left=xx - 5;	
			}else{
				document.getElementById("myAdBox").style.left=460
			}
			
			document.getElementById("myAdBox").style.top=yy+5 + document.body.scrollTop;
			document.getElementById("myAdBox").style.display="";
		}
	}
}

function fnLoadBreadcrumb(){
	var sString
	
	/*for (i=0; i<document.getElementById('cboBrand').options.length; i++){
		if (document.getElementById('cboBrand').options[i].selected == true){
			Brand = document.getElementById('cboBrand').options[i].text
		}
	}
	for (i=0; i<document.getElementById('cboCategory').options.length; i++){
		if (document.getElementById('cboCategory').options[i].selected == true){
			Category = document.getElementById('cboCategory').options[i].text
		}
	}
	
	if (Brand != ""){
		sString = '<a href="/">Brand</a>'
	}
	
	if (Brand != "" && Category != ""){
		sString = '<a href="/" class="subheading">'+Brand+'</a> > <a href="javascript:history.back()" class="subheading">'+Category+'</a>'
	}
	
	document.getElementById('breadcrumb').innerHTML = sString*/
}


