var screensize = window.screen.width

if(screensize < 800)
	{window.location.href="resolution.asp"}

var version = navigator.appVersion
var offset = ""
offset = version.indexOf("MSIE")
version = version.charAt(offset + 5)

//alert(navigator.appVersion)
var isNav, isIe

if(navigator.appName.indexOf("Netscape") != -1)
	{isNav = true}
else

if(navigator.appName.indexOf("Microsoft") != -1)
	{isIe = true}


function setSubMenu(thisOne,thisColour,textColour)

{
//alert(textColour)
var obj

if (document.all)
		{
		
	//alert("IE")
		obj = document.all(thisOne).style.backgroundColor = thisColour
		
		obj = document.all("text"+thisOne).style.color = textColour
		
		obj = document.all("ind"+thisOne).style.backgroundColor = thisColour

			
		}
		
	else if (document.getElementById)
		{
		//alert("netscapev6+")
		obj = document.getElementById(thisOne).style.backgroundColor = thisColour
		
		obj = document.getElementById("text"+thisOne).style.color = textColour
		}
		
	else if (document.layers)
		{
		//alert("netscapev4")
		obj = ""
		}
		
}



function setBackground(thisOne,thisColour,textColour)

{
//alert(textColour)
var obj

if (document.all)
		{
		
	//alert("IE")
		obj = document.all(thisOne).style.backgroundColor = thisColour
		
		obj = document.all("text"+thisOne).style.color = textColour
		
		}
		
	else if (document.getElementById)
		{
		//alert("netscapev6+")
		obj = document.getElementById(thisOne).style.backgroundColor = thisColour
		
		obj = document.getElementById("text"+thisOne).style.color = textColour
		}
		
	else if (document.layers)
		{
		//alert("netscapev4")
		obj = ""
		}
		
}



var finalWidth = ""
var screenRes = window.screen.width /2
var viewerScreen = window.screen.width
var leftAnchor = ""

function create(thisWidth,thisHeight,thisProduct)
{

//alert(thisPrinter)
if(viewerScreen > 800)
{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 50
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}

else

{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 40
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}





leftAnchor = screenRes - (finalWidth / 2)
//alert("status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(finalWidth)



var writeBody = ""
//thisProduct = "view_" + thisCategory + ".asp?id=" + thisProduct + "&voltage=" + thisVoltage + "&category=" + thisCategory
//alert(thisProduct)
var newWin = window.open("","","status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(newWin.value)
if(newWin!=null || newWin.closed)

	{
	newWin.window.resizeTo(finalWidth,finalHeight)
	newWin.location = thisProduct
	newWin.document.close()
	}
}

function directions(thisWidth,thisHeight)
{
//alert(thisPrinter)
if(viewerScreen > 800)
{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 40
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}

else

{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 40
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}





leftAnchor = screenRes - (finalWidth / 2)
//alert("status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(finalWidth)



var writeBody = ""
thisProduct = "print_directions.asp"
//alert(thisProduct)
var newWin = window.open("","","status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(newWin.value)
if(newWin!=null || newWin.closed)

	{
	newWin.window.resizeTo(finalWidth,finalHeight)
	newWin.location = thisProduct
	newWin.document.close()
	}
}


// Title: Tigra Scroller
// Description: See the demo at url
// URL: http://www.softcomplex.com/products/tigra_scroller/
// Version: 1.4
// Date: 07-03-2003 (mm-dd-yyyy)
// Feedback: feedback@softcomplex.com (specify product title in the subject)
// Note: Permission given to use this script in ANY kind of applications if
//    header lines are left unchanged.
// About us: Our company provides offshore IT consulting services.
//     Contact us at sales@softcomplex.com if you have any programming task you
//     want to be handled by professionals.

// set correct path to Tigra Scroller files
var Tscroll_path_to_files = 'scroller/ts_files/'

// please, don't change anything below this line
function Tscroll_init (id) {
	document.write ('<iframe id="Tscr' + id + '" scrolling=no frameborder=no src="' + Tscroll_path_to_files + 'scroll.html?' + id + '" width="1" height="1"></iframe>');
}


function focusOnUser()
{
document.forms[0].name.focus()
}

function focusOnLogin(field)
{
//alert(field)
document.forms[0][field].focus()
}

function goSend()
{
//alert("send")
document.forms[0].submit()

}

function addToFavorite(favTitle)
{

if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) 

		{
		//alert(location.href)
		window.external.AddFavorite(location.href, unescape(favTitle));
		}
}


function recommend(enquiry)
{


  if(enquiry.Company_Name.value == "")
  {
    alert("Please enter the name of the company you wish to recommend.");
    enquiry.Company_Name.focus();
	enquiry.Company_Name.select();
    return (false);
  }

    if(enquiry.Contact_Name.value == "")
  {
    alert("Please enter your own name.");
    enquiry.Contact_Name.focus();
	enquiry.Contact_Name.select();
    return (false);
  }
  
       
  	
if(enquiry.Phone_Number.value == "")
  {
    alert("Please enter your own telephone number.");
    enquiry.Phone_Number.focus();
	enquiry.Phone_Number.select();
    return (false);
  }
  
  
  
  var checkOK = "0123456789-+() \t\r\n\f";
  var checkStr = enquiry.Phone_Number.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digits in the \"Telephone\" field.");
    enquiry.Phone_Number.focus()
	enquiry.Phone_Number.select()
    return (false);
  }
  

  if(enquiry.Contact_Email.value == "")
  {
    alert("An e-mail address is required for your confirmation.");
    enquiry.Contact_Email.focus();
	enquiry.Contact_Email.select()
    return (false);
  }
  
return (true);
}

function checkProduct(thisOne)
{

if(parseInt(thisOne.Qty_Ordered.value) < 1)
	{
	alert("Please enter a qty of 1 or more.")
	thisOne.Qty_Ordered.focus()
	thisOne.Qty_Ordered.select()
    return (false);
	}
	
var checkOK = "123456789";
  var checkStr = thisOne.Qty_Ordered.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digits in the \"Qty\" field.");
    thisOne.Qty_Ordered.focus()
	thisOne.Qty_Ordered.select()
    return (false);
  }

thisOne = parseInt(product.Format_Type.selectedIndex)

if(product.Format_Type.options[thisOne].value == "select")
  {
    alert("Please select a format suitable for the TV system in your country.\n\nIf you are unsure of which format you need please refer to the \"How To\"\nsection where you will find information on the different formats.");
    product.Format_Type.focus();
    return (false);
  }

}


function verify(enquiry)
{

  if(enquiry.contactName.value == "")
  {
    alert("Please enter a contact name.");
    enquiry.contactName.focus();
	enquiry.contactName.select();
    return (false);
  }

var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ";
  var checkStr = enquiry.contactName.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter characters in the \"name\" field.");
    enquiry.contactName.focus();
	enquiry.contactName.select()
    return (false);
  }
  


    if(enquiry.contactPhone.value == "")
  {
    alert("You haven't entered a contact number ...");
    enquiry.contactPhone.focus();
	enquiry.contactPhone.select();
    return (false);
  }
  
  
  
  var checkOK = "0123456789-+()[] ";
  var checkStr = enquiry.contactPhone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digits and the characters + - [ ] ( ) in the \"contact phone\" field.");
    enquiry.contactPhone.focus()
	enquiry.contactPhone.select()
    return (false);
  }

    if(enquiry.contactEmail.value == "")
  {
    alert("Please enter an eMail address if you have one, otherwise enter \"n/a\".");
    enquiry.contactEmail.focus();
	enquiry.contactEmail.select();
    return (false);
  }
  
      if(enquiry.companyName.value == "")
  {
    alert("Please supply us with your Company Name.");
    enquiry.companyName.focus();
	enquiry.companyName.select();
    return (false);
  }



return (true);

}

function resetBackgroundDemo(thisOne,colour)

{
var obj

		if (document.all)
		{
		
	//alert("IE")
		obj = document.all(thisOne).style.backgroundColor = colour
		}
		
	else if (document.getElementById)
		{
		//alert("netscapev6+")
		obj = document.getElementById(thisOne).style.backgroundColor = colour
		}
		
	else if (document.layers)
		{
		//alert("netscapev4")
		obj = ""
		}
		
	
}


function setBackgroundDemo(thisOne,colour)

{

var obj

if (document.all)
		{
		
	//alert("IE")
		obj = document.all(thisOne).style.backgroundColor = colour
		}
		
	else if (document.getElementById)
		{
		//alert("netscapev6+")
		obj = document.getElementById(thisOne).style.backgroundColor = colour
		}
		
	else if (document.layers)
		{
		//alert("netscapev4")
		obj = ""
		}
		//obj.thisOne.style.backgroundColor = colour

		
}

function verifyDemo(enquiry)
{

  if(enquiry.name.value == "")
  {
    alert("Please enter a name to \npersonalise the response E-mail.");
    enquiry.name.focus();
	enquiry.name.select();
    return (false);
  }

var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ";
  var checkStr = enquiry.name.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter characters in the \"name\" field.");
    enquiry.name.focus();
	enquiry.name.select()
    return (false);
  }
  

  if(enquiry.replyto.value == "")
  {
    alert("Please enter a valid E-mail address \nfor us to mail the response to.");
    enquiry.replyto.focus();
	enquiry.replyto.select()
    return (false);
  }
  
  

  
  
if(enquiry.contactme.checked == true)
  {
    if(enquiry.phone.value == "")
  {
    alert("You have ticked the box asking for us to contact you \nbut you haven\'t supplied a phone number.");
    enquiry.phone.focus();
	enquiry.phone.select();
    return (false);
  }
  
  
  
  var checkOK = "0123456789-+() \t\r\n\f";
  var checkStr = enquiry.phone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digits in the \"phone\" field.");
    enquiry.phone.focus()
	enquiry.phone.select()
    return (false);
  }
  }
  

return (true);

}

function createPrinter(thisWidth,thisHeight,thisPrinter)
{
//alert(thisPrinter)
if(viewerScreen > 800)
{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 40
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}

else

{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 40
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}





leftAnchor = screenRes - (finalWidth / 2)
//alert("status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(finalWidth)



var writeBody = ""
thisPrinter = "printer_display.asp?printer=" + thisPrinter
//alert(thisPrinter)
var newWin = window.open("","","status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(newWin.value)
if(newWin!=null || newWin.closed)

	{
	newWin.window.resizeTo(finalWidth,finalHeight)
	newWin.location = thisPrinter
	newWin.document.close()
	}
}

function demoProduct(thisWidth,thisHeight,thisProduct)
{
//alert(thisPrinter)
if(viewerScreen > 800)
{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 40
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}

else

{
finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 40
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 10
}





leftAnchor = screenRes - (finalWidth / 2)
//alert("status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(finalWidth)



var writeBody = ""
thisProduct = "product_display.asp?action=display&item=" + thisProduct
//alert(thisProduct)
var newWin = window.open("","","status=no,toolbar=no,title=no,location=no,scrollbars=yes,resizable=yes,screenX=100,left=" + leftAnchor + ", top=0")
//alert(newWin.value)
if(newWin!=null || newWin.closed)

	{
	newWin.window.resizeTo(finalWidth,finalHeight)
	newWin.location = thisProduct
	newWin.document.close()
	}
}

function verifyContact(enquiry)
{

  if(enquiry.name.value == "")
  {
    alert("Please enter your full name.");
    enquiry.name.focus();
    return (false);
  }

var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-. ";
  var checkStr = enquiry.name.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter characters in the \"name\" field.");
    enquiry.name.focus();
	enquiry.name.select()
    return (false);
  }

if(enquiry.phone.value == "")
  {
    alert("Please enter a contact telephone number.");
    enquiry.phone.focus();
    return (false);
  }



  var checkOK = "+[]()0123456789- \t\r\n\f";
  var checkStr = enquiry.phone.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digits in the \"phone\" field.");
    enquiry.phone.focus()
	enquiry.phone.select()
    return (false);
  }





if(enquiry.replyTo.value == "")
  {
    alert("To enable us to respond to your request,\nplease enter the E-mail address we should reply to.\nIf you don't yet have an E-mail, please just type in \'none\'.");
	enquiry.replyTo.focus();    
	return (false);
  }
  
  
if(enquiry.profile.value == "")
  {
    alert("Please enter the name of your company.");
	enquiry.profile.focus();    
	return (false);
  }

return (true);

}

function verifyOrder(enquiry)
{

  if(enquiry.bill_name.value == "")
  {
    alert("Please enter any name in the Name field.");
    enquiry.bill_name.focus();
	enquiry.bill_name.select();
    return (false);
  }

var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- ";
  var checkStr = enquiry.bill_name.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter characters in the \"name\" field.");
    enquiry.bill_name.focus();
	enquiry.bill_name.select()
    return (false);
  }
  


if(enquiry.bill_email.value == "")
  {
    alert("To enable us to send your confirmation,\nplease enter a valid E-mail address.");
	enquiry.bill_email.focus();    
	return (false);
  }
  


return (true);

}

function setText(thisOne)

{
//alert("here")
	var obj

if (document.all)
		{
		
	//alert("IE")
		//obj = document.all("centre"+thisOne).style.backgroundColor = thisColour
		
		obj = document.all(thisOne).style.textDecoration = "underline"

		}
		
	else if (document.getElementById)
		{
		//alert("netscapev6+")
		//obj = document.getElementById("centre"+thisOne).style.backgroundColor = thisColour
		
		obj = document.getElementById(thisOne).style.textDecoration = "underline"
		}
		
	else if (document.layers)
		{
		//alert("netscapev4")
		obj = ""
		}

	
}


function resetText(thisOne)

{

	var obj

if (document.all)
		{
		
	//alert("IE")
		//obj = document.all("centre"+thisOne).style.backgroundColor = thisColour
		
		obj = document.all(thisOne).style.textDecoration = "none"

		}
		
	else if (document.getElementById)
		{
		//alert("netscapev6+")
		//obj = document.getElementById("centre"+thisOne).style.backgroundColor = thisColour
		
		obj = document.getElementById(thisOne).style.textDecoration = "none"
		}
		
	else if (document.layers)
		{
		//alert("netscapev4")
		obj = ""
		}

	
}

function showProduct(thisPage,thisWidth,thisHeight)
{
//alert(thisWidth)

finalWidth = parseInt(thisWidth)
finalWidth = finalWidth + 50
finalHeight = parseInt(thisHeight)
finalHeight = finalHeight + 40


leftAnchor = screenRes - (finalWidth / 2)
//alert(finalHeight)

var newWin = window.open("product_image.asp?id=" + thisPage + "","","status=no,toolbar=no,title=no,alwaysRaised=yes,location=no,scrollbars=yes,resizable=yes,left=" + leftAnchor + ", top=100")
//alert(newWin)
if(newWin!=null || newWin.closed)

{
newWin.window.resizeTo(finalWidth,finalHeight)
//newWin.window.resizeTo('800','800')
newWin.document.close()
}


}
