function openWin(pagename){
		microsite_window=window.open(pagename,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=no,menubar=no,scrollbars=no,top=0,left=0,resizable=no,width=10,height=10')
	}
<!-- Begin
var win = null;
function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
//  End -->
//javascript:newWindow('downloads.asp','','600','420')
	function test(obj,msg) {
		  var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
		  if (regex.test(obj.value))
		  {
			return true;
		  }
		  else{
			alert(msg);
			obj.focus();
			return false;
		  }
		}

	function checkempty(obj,msg)
	{
	 if(obj.value=="")
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}
	function checkint(obj,msg)
	{
	 if(isNaN(obj.value))
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}
function confirmPassword(obj,obj1,msg)
{
 if(!(obj.value==obj1.value))
 {
  alert(msg);
  obj.focus();
  return false;
 }
}
function isnumber(obj,msg)
{
 if(isNaN(obj.value))
 {
  alert(msg);
  obj.focus();
  return false;
 }
}
	function checksForm()
	{
		if (checkempty(document.frmsearch.txtsearch,"Search Information - Enter Search words")==false) return false;
		return true;
	}
	function checkfForm()
	{
		if (checkempty(document.frmfeed.name,"Contact Information - Enter Name")==false) return false;
		if (test(document.frmfeed.email,"Contact Information - Email Address Is Required")==false) return false;
//		if (checkempty(document.frmfeed.comments,"Contact Information - Enter Comments")==false) return false;
		return true;
	}
	function chkqty()
	{
		if (checkempty(document.frmadd.qty,"Information - Enter Quantity")==false) return false;
		return true;
	}
	function checkicForm()
	{
		if (checkempty(document.frmCon.fname,":::...Enter Your Full Name...:::")==false) return false;
		if (checkempty(document.frmCon.company,":::...Enter Your Company Name...:::")==false) return false;
		if (test(document.frmCon.email,":::...Email Address Is Required...:::")==false) return false;
		return true;
	}
	function checkForm()
	{
		if (checkempty(document.frmcatalogue.name,"Catalogue Information - Enter Your Name")==false) return false;
		if (checkempty(document.frmcatalogue.company,"Catalogue Information - Enter Your Compnay Name")==false) return false;
		if (checkempty(document.frmcatalogue.phone,"Catalogue Information - Enter Your Phone")==false) return false;
		if (test(document.frmcatalogue.email,"Catalogue Information - Email Address Is Required")==false) return false;
		if (checkempty(document.frmcatalogue.mailing,"Catalogue Information - Enter Your Mailing Address")==false) return false;
		return true;
	}
	function checkfeedForm()
	{
		if (checkempty(document.frmfeed.name,"Contact Information - Enter Name")==false) return false;
		if (test(document.frmfeed.email,"Contact Information - Email Address Is Required")==false) return false;
		if (checkempty(document.frmfeed.comments,"Contact Information - Enter Comments")==false) return false;
		return true;
	}
	function checkinqForm()
	{
		if (checkempty(document.form1.txtname,"Inquiry Information - Enter Contact Person Name")==false) return false;
		if (checkempty(document.form1.txtcompany,"Inquiry Information - Enter Company Name")==false) return false;		
		if (checkempty(document.form1.txttel,"Inquiry Information - Enter Your Phone No.")==false) return false;
		if (checkempty(document.form1.txtfax,"Inquiry Information - Enter Your Fax No.")==false) return false;
		if (test(document.form1.txtemail,"Inquiry Information - Email Address Is Required")==false) return false;
		if (checkempty(document.form1.txtaddress,"Inquiry Information - Enter Your Address")==false) return false;
		return true;
	}
	function checkinqForm1()
	{
		if (checkempty(document.form1.fname,"Inquiry Information - Enter Contact Person Name")==false) return false;
		if (checkempty(document.form1.company,"Inquiry Information - Enter Company Name")==false) return false;		
		if (checkempty(document.form1.ph,"Inquiry Information - Enter Your Phone No.")==false) return false;
		if (checkempty(document.form1.fax,"Inquiry Information - Enter Your Fax No.")==false) return false;
		if (test(document.form1.email,"Inquiry Information - Email Address Is Required")==false) return false;
		if (checkempty(document.form1.address,"Inquiry Information - Enter Your Address")==false) return false;
		return true;
	}
	function chksubscribe()
	{
		if (test(document.frmsubscribe.txtsubscribe,"Email Subscribe! - id@domainname.com")==false) return false;
		return true;
	}
	
	
	
	///////////////////////////////////////////////////////////////////////////
// History Go Back
// History Go Forward
// Set as HomePage
// Add Favorite
// Fade in Fadeout animation
// For Search
// No Right Click
// Rain Bow Color
// On Selection of Text
// Open window
// Input Box Color Change
// Form Validation 
// Roll over in Form Page
// Text Box with Limitation
// Search Box Color Change

//////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
// History Go Back
//////////////////////////////////////////////////////////////////////////
// <!-- Will send the browser back one page.Use 0 to reload the current page. -->
// <Script Language="JavaScript"><!-- Begin history.go(1)// End --></Script>

//////////////////////////////////////////////////////////////////////////



/////////////////////////////////////////////////////////////////////////
// History Go Forward
//////////////////////////////////////////////////////////////////////////
// <!-- Will send the browser forward one page.Use 0 to reload the current page. -->
// <Script Language="JavaScript"><!-- Begin history.go(-1)// End --></Script>
//////////////////////////////////////////////////////////////////////////



/////////////////////////////////////////////////////////////////////////
// Set as HomePage
//////////////////////////////////////////////////////////////////////////
// <A href="javascript:history.go(0)" onClick="javascript:this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.YourLink.com');" TARGET="_self">Set As HomePage</A></SCRIPT>
//////////////////////////////////////////////////////////////////////////




/////////////////////////////////////////////////////////////////////////
// Add to Favorite
//////////////////////////////////////////////////////////////////////////
// <A href="javascript:window.external.AddFavorite('http://YourLink.com','Your WebPage Title')">add To Favourites</a>
//////////////////////////////////////////////////////////////////////////



///////////////////////////////////////////////////////////////////////////
// Fadein Fadeout animation
// <body onLoad="runSlideShow()" > 
// <IMG SRC="images/q_25.jpg" name='SlideShow' WIDTH=532 HEIGHT=182 ALT="">
//////////////////////////////////////////////////////////////////////////
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;
// Duration of crossfade (seconds)
var crossFadeDuration = 10;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/q_25.jpg'
Pic[1] = 'images/ani2.jpg'
Pic[2] = 'images/ani.jpg'



// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
///////////////////////////////////////////////////////////////////////////
// For Search 
// tips_form.js
//////////////////////////////////////////////////////////////////////////
// Tipue 1.53


// ---------- script properties ----------


var results_location = "results.asp";


// ---------- end of script properties ----------


function search_form(tip_Form) {
	if (tip_Form.d.value.length > 0) {
		document.cookie = 'd=' + escape(tip_Form.d.value) + '; path=/';
		document.cookie = 'n=0; path=/';
		window.location = results_location;
	}
}
///////////////////////////////////////////////////////////////////////////
// No Right Click
//////////////////////////////////////////////////////////////////////////


/*
(c) UNAS Jee / www.geocities.com/Syed Zahid M. Rizvi / Syed Zahid M. Rizvi@hotmail.com
*/

function NSclick(e) {
	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) { 
		if (e.which == 3) {
			return false;
		}
	}
	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) { 
    		if (e.button == 2 || e.button == 3) {
      			e.preventDefault();
			return false;
  		}
	}
}

if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) { 
	document.onmousedown=NSclick;
	document.captureEvents(Event.MOUSEDOWN);
}
if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) { 
	document.onmouseup=NSclick;
}
if (navigator.appName=="Microsoft Internet Explorer") { 
	document.oncontextmenu = new Function("return false;")
}






//=============================================================================
// Change Color
//  This function changes a color actually.
//=============================================================================
function ChangeColor()
{
    objActive.style.color = makeColor();
}


//=============================================================================
// makeColor
//  This function makes rainbow colors.
//=============================================================================
function makeColor()
{
    // Don't you think Color Gamut to look like Rainbow?

    // HSVtoRGB
    if (elmS == 0) {
        elmR = elmV;    elmG = elmV;    elmB = elmV;
    }
    else {
        t1 = elmV;
        t2 = (255 - elmS) * elmV / 255;
        t3 = elmH % 60;
        t3 = (t1 - t2) * t3 / 60;

        if (elmH < 60) {
            elmR = t1;  elmB = t2;  elmG = t2 + t3;
        }
        else if (elmH < 120) {
            elmG = t1;  elmB = t2;  elmR = t1 - t3;
        }
        else if (elmH < 180) {
            elmG = t1;  elmR = t2;  elmB = t2 + t3;
        }
        else if (elmH < 240) {
            elmB = t1;  elmR = t2;  elmG = t1 - t3;
        }
        else if (elmH < 300) {
            elmB = t1;  elmG = t2;  elmR = t2 + t3;
        }
        else if (elmH < 360) {
            elmR = t1;  elmG = t2;  elmB = t1 - t3;
        }
        else {
            elmR = 0;   elmG = 0;   elmB = 0;
        }
    }

    elmR = Math.floor(elmR).toString(16);
    elmG = Math.floor(elmG).toString(16);
    elmB = Math.floor(elmB).toString(16);
    if (elmR.length == 1)    elmR = "0" + elmR;
    if (elmG.length == 1)    elmG = "0" + elmG;
    if (elmB.length == 1)    elmB = "0" + elmB;

    elmH = elmH + rate;
    if (elmH >= 360)
        elmH = 0;

    return '#' + elmR + elmG + elmB;
}

///////////////////////////////////////////////////////////////////////////
// On Selection of Text
//////////////////////////////////////////////////////////////////////////
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

///////////////////////////////////////////////////////////////////////////
// Open window
//////////////////////////////////////////////////////////////////////////
function openwindow(open){
window.open(open,"Popup","toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width=550, height=465, top=0, left=0")
}


///////////////////////////////////////////////////////////////////////////
// Input Box Color Change
//////////////////////////////////////////////////////////////////////////
// Created by: Luis O. Hernandez
// Date: 04/21/2001



// Erases contents of search box when users clicks the box or

// when the user submits the form without modifying the search


var formElements = new Array();
	

function focusObject(objElement)

{
	hasChanged = false;
		

	for (i = 0; i < formElements.length; i++)
	
{
		if (formElements[i] == objElement.name)
		
{
			hasChanged = true;
		}
	}
			


		if (!hasChanged)
		{
			objElement.value = "";
			formElements[formElements.length + 1] = objElement.name;
		}
		
	
		objElement.style.background = "#ffffff";
}
	

function focusSearchObject(objElement)
{
	objElement.style.background = "#FFFC6F";
}
	
function blurObject(objElement)
	{
		objElement.style.background = "#FFFFFF";
	}


function focussearch()
	
{
		document.msearch.QUERY.focus();
	}


// Hides/shws content area
function changeContent(objSelect)
{
	var strValue = objSelect.checked;
	
	if (strValue == 0)
	
{
		document.getElementById("dynDisplay").style.display = "none";
	
} else {
		document.getElementById("dynDisplay").style.display = "block";
	}
}

function setSkyScraper() {
	if (document.body.offsetWidth > 750) 
{
		document.getElementById("skyscraper").style.visibility = '';

		document.getElementById("skyscraper").style.left = 630;

	} else {
		document.getElementById("skyscraper").style.visibility = 'hidden';
		document.getElementById("skyscraper").style.left = 0;
	}
}


function cleanCAPS(objIncoming) {
	str = objIncoming.value;

	capsallowed = 3; // Lowercase if more than ## CAPS in a row
	
do {
		eval("re = /([A-Z]{" + (capsallowed+1) + ",})/g;");
	
	myArray = str.match(re);
		if (myArray) {
			eval("re = /" + myArray[0] + "/;");

			str = str.replace(re, ""+ myArray[0].substring(0,1) + (myArray[0].substring(1,myArray[0].length)).toLowerCase() );
 		}

	} while (myArray);

	objIncoming.value = str;
}










///////////////////////////////////////////////////////////////////////////
// Form Validation 
//////////////////////////////////////////////////////////////////////////
<!-- Form Check by Kurt Grigg - http://website.lineone.net/~kurt.grigg/javascript

//EXTERNAL RESET ALL FUNCTION
function clearform(){
var fields=document.entry.elements;
for(i=0; i < fields.length; i++)
fields[i].value="";
}

//HIGHLIGHT DUD BOXES!
function showerror(thisbox){
thisbox.focus();
thisbox.select();
}


function subcheck(){
/********************************************************************************** 
If your form is going to be inside a div/layer, Netscape4 requires the full path. 
Example: var e = (document.layers)?document.LayerName.document.entry:document.entry;
***********************************************************************************/

var e=document.entry;

/*****************************************************************
The form box names. Make sure they're in the same order as your form.
*****************************************************************/

boxes=new Array();
boxes[0]=e.Name;
boxes[1]=e.Address;
boxes[2]=e.Phone;
boxes[3]=e.Email;


//CHECK FOR SWEARING FIRST ############################################################
var swear = new Array("anus","arse","bastard","bitch","bollocks","clit","cock","crap","cunt","fuck","spunk","minge","fanny","shit","wanker","piss","twat");
for (i=0; i < boxes.length; i++){
var sneaky = boxes[i].value.toLowerCase();
 for (j=0; j < swear.length; j++){  
  if (sneaky.indexOf(swear[j]) != -1){
  alert(boxes[i].name+' Box:\nPlease remove the swear word - '+swear[j].toUpperCase());
  showerror(boxes[i]);
  return false;
  }
 }
}
//#####################################################################################


//EMPTY BOX CHECK AND ALERT FORMAT###############################################
var blanks="";//Stop entry being just 0's or spaces!
var count=0;
var naughtyboxes=new Array();
var dum="";
var senddata=1;
var lnbrk=null;
for (i=0; i < boxes.length; i++){
 if ((boxes[i].value == "") || (boxes[i].value <= blanks*boxes[i].value.length)){
 naughtyboxes[i]=boxes[i].name;
 senddata=0;
 }
 if (naughtyboxes[i] == null){
 naughtyboxes[i]="";
 lnbrk="";
 } 
 else lnbrk="\n";
if (naughtyboxes[i] == "")count++;
disp = dum += naughtyboxes[i]+lnbrk;
}

//Get correct grammer if only one box is empty!
if (senddata==0){
grmr1=(count == boxes.length-1)?"This":"These";
grmr2=(count == boxes.length-1)?"box":"boxes";
alert(grmr1+" "+grmr2+" must be completed:\n\n"+disp);
return false;
}
//###############################################################################


//NAME CHECK####################################################################
//Stop entering all same letter.
temparray=boxes[0].value.split(boxes[0].value.charAt(0));
if (boxes[0].value.length > 2 && boxes[0].value.length+1 == temparray.length){
 alert(boxes[0].name+' Box:\nYou have entered just '+boxes[0].value.charAt(0)+'\'s');
 showerror(boxes[0]);
 return false;
 }

//Similar to above.
for (i=1; i < boxes[0].value.length; i++){
if (boxes[0].value.charAt(i) != ' '    && boxes[0].value.charAt(i) == boxes[0].value.charAt(i-1) && boxes[0].value.charAt(i) == boxes[0].value.charAt(i+1)){
 alert(boxes[0].name+' Box:\nNever heard of a name with 3 or more consecutive '+boxes[0].value.charAt(i)+'\'s.');
 showerror(boxes[0]);
 return false;
 }
}
//###############################################################################


//PHONE CHECK####################################################################
//Allow numbers only! This can be applied to any text boxes that require numbers only!
for (i=0; i < boxes[2].value.length; i++){     
var pval = boxes[2].value.substring(i, i + 1);      
 if ((pval < "0" || "9" < pval) && pval != " "){
 alert(boxes[2].name+' Box:\nNumbers only');
 showerror(boxes[2]);
 return false;
 } 
}
//Check length! This can be applied to all text boxes/areas!
if (boxes[2].value.length < 7){
 alert(boxes[2].name+' Box:\nPlease enter full number');
 showerror(boxes[2]);
 return false;
}
//###############################################################################


//MAIL CHECK####################################################################
var temp1=boxes[3].value.split('');
var temp2="";
var spaces=0;
var dud = boxes[3].name+" Box:\nYou have entered illegal characters.\nOnly characters listed here allowed.\n\nLetters of Alphabet [lower and upper case]\nNumbers\nOne @ symbol only\nFull stops\nHyphens [Minus sign]\nUnderscores\n\n";

//Remove white space from e-mail!
for (i=0; i < temp1.length; i){
if (temp1[i]==" ") 
  {
  spaces=1;
  temp1[i]="";
  }
var nospace=temp2+=temp1[i];
++i;
}

//Format before submission!
if (spaces==1){
alert(boxes[3].name+" Box:\nRemoving spaces from "+boxes[3].name+" field. These can\ncause problems with some cgi auto mail scripts");
boxes[3].value=nospace;
}

//Check for illegal characters 1!
for (i=0; i < boxes[3].value.length; i++){
var caps = "a".toUpperCase();
var E = boxes[3].value.substring(i, i + 1);
if ((E < "0" || "9" < E ) && E != "@" && E !="." && E !="-" && E !="_" &&  E < caps || "z" < E){
 alert(dud);
 showerror(boxes[3]);
 return false;
 }
}

//Check for illegal characters 2!
if ((boxes[3].value.indexOf('`',0) != -1) || 
(boxes[3].value.indexOf(String.fromCharCode(94)) != -1) || 
(boxes[3].value.indexOf(String.fromCharCode(92)) != -1) || 
(boxes[3].value.indexOf('[',0) != -1) || 
(boxes[3].value.indexOf(']',0) != -1)){
 alert(dud);
 showerror(boxes[3]);
 return false;
}

//Check general formating!
if (boxes[3].value.length > 62){
 alert(boxes[3].name+' Box:\nMax e-mail length is 63 characters');
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.charAt(0) =="."){
 alert(boxes[3].name+' Box:\nAn e-mail address cannot start with a full stop');
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.split('@').length > 2){
 alert(boxes[3].name+' Box:\nOnly 1 @ allowed in e-mail address');
 showerror(boxes[3]);
 return false;
}



else if (boxes[3].value.indexOf ('@',0) == -1){
 alert(boxes[3].name+' Box:\nThe @ symbol is missing');
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.indexOf("@") < 2){
 alert(boxes[3].name+' Box:\nThere must be at least 2 characters before @ symbol.');
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.charAt(boxes[3].value.length-1) == "@"){
 alert(boxes[3].name+' Box:\nAn e-mail address cannot finish with an @');
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.indexOf ('.') == -1){
 alert(boxes[3].name+" Box:\nAn e-mail address must contain at least 1 full stop");
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.indexOf('.',boxes[3].value.indexOf('@')) == -1){
 alert(boxes[3].name+' Box:\nThe full stop after the @ is missing');
 showerror(boxes[3]);
 return false;
}

else if (boxes[3].value.substring(boxes[3].value.indexOf('@'),boxes[3].value.length).lastIndexOf(".") < 4){
 alert(boxes[3].name+' Box:\nThere must be at least 3 characters between @ and last full stop');  
 showerror(boxes[3]);
 return false;
}

else if (boxes[3].value.lastIndexOf(".")+2 == boxes[3].value.length){
 alert(boxes[3].name+' Box:\nThere must be at least 2 characters after last full stop');
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.substring(boxes[3].value.lastIndexOf("."),boxes[3].value.length).length > 4){
 alert(boxes[3].name+' Box:\nOnly 3 characters allowed after last full stop');
 showerror(boxes[3]);
 return false;
}
else if (boxes[3].value.charAt(boxes[3].value.length-1) =="."){
 alert(boxes[3].name+' Box:\nAn e-mail address cannot finish with a full stop');
 showerror(e.Email);
 return false;
}
else if ((boxes[3].value.indexOf('@') != -1) && boxes[3].value.indexOf('.') != -1){
var dom = boxes[3].value.substring(boxes[3].value.lastIndexOf(".")+1,boxes[3].value.length);
for (i=0; i < dom.length; i){ 
var checkdom = dom.substring(i, i+1);      
  if (checkdom < 'a' || 'z' < checkdom)
  {
  alert(boxes[3].name+' Box:\nPlease enter a valid domain "com, net or co.uk etc"\nDomains must be lowercase letters of Alphabet only');
  showerror(boxes[3]);
  return false;
  }
i++; 
}
}

//LAST CHECK WITH USER BEFORE SUBMISSION#########################################
if (confirm('Thank you '+boxes[0].value+'.\n\nThe information entered is suitable for submission. If\nyou wish to alter click cancel else click ok to submit'))
return true;
else return false;
}
//-->




///////////////////////////////////////////////////////////////////////////
// Roll over in Form Page
//////////////////////////////////////////////////////////////////////////
/*
	Header Information------------------------------------[Do Not Remove This Header]--
	Title: OO Dom Image Rollover
	Description: This script makes it easy to add rollover/ mousedown 
  	effects to any image on the page, including image submit buttons. Automatically 
  	preloads images as well. Script works in all DOM capable browsers- IE5+, NS6+, 
  	Opera7+.
	
	Legal: Copyright 2005 Adam Smith
	Author Email Address: ibulwark@hotmail.com
	Date Created: June 6, 2005
	Website: Codevendor.com | eBadgeman.com
	Script featured on Dynamic Drive: http://www.dynamicdrive.com
	-----------------------------------------------------------------------------------
*/

function imageholderclass(){
	this.over=new Array();
	this.down=new Array();
	this.src=new Array();
	this.store=store;
	
	function store(src, down, over){
		var AL=this.src.length;
		this.src[AL]=new Image(); this.src[AL].src=src;
		this.over[AL]=new Image(); this.over[AL].src=over;
		this.down[AL]=new Image(); this.down[AL].src=down;
	}
}

var ih = new imageholderclass();
var mouseisdown=0;

function preloader(t){
	for(i=0;i<t.length;i++){
		if(t[i].getAttribute('srcover')||t[i].getAttribute('srcdown')){
			
			storeimages(t[i]);
			var checker='';
			checker=(t[i].getAttribute('srcover'))?checker+'A':checker+'';
			checker=(t[i].getAttribute('srcdown'))?checker+'B':checker+'';
			
			switch(checker){
			case 'A' : mouseover(t[i]);mouseout(t[i]); break;
			case 'B' : mousedown(t[i]); mouseup2(t[i]); break;
			case 'AB' : mouseover(t[i]);mouseout(t[i]); mousedown(t[i]); mouseup(t[i]); break;
			default : return;			
			}
			
			if(t[i].src){t[i].setAttribute("oldsrc",t[i].src);}
		}
	}
}
function mouseup(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");this.oldmouseup();}

	}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");}}
	t.onmouseup=newmouseup;
}

function mouseup2(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");this.oldmouseup();}
		}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");}}
	t.onmouseup = newmouseup;
}

function mousedown(t){
	var newmousedown;
	if(t.onmousedown){
		t.oldmousedown=t.onmousedown;
		newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");this.oldmousedown();}}
	}
	else{newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");}}}
	t.onmousedown=newmousedown;
}

function mouseover(t){
	var newmouseover;
	if(t.onmouseover){
		t.oldmouseover=t.onmouseover;
		newmouseover=function(){this.src=this.getAttribute("srcover");this.oldmouseover();}
	}
	else{newmouseover=function(){this.src=this.getAttribute("srcover");}}
	t.onmouseover=newmouseover;
}

function mouseout(t){
	var newmouseout;
	if(t.onmouseout){
		t.oldmouseout=t.onmouseout;
		newmouseout=function(){this.src=this.getAttribute("oldsrc");this.oldmouseout();}
	}
	else{newmouseout=function(){this.src=this.getAttribute("oldsrc");}}
	t.onmouseout=newmouseout;
}

function storeimages(t){
	var s=(t.getAttribute('src'))?t.getAttribute('src'):'';
	var d=(t.getAttribute('srcdown'))?t.getAttribute('srcdown'):'';
	var o=(t.getAttribute('srcover'))?t.getAttribute('srcover'):'';
	ih.store(s,d,o);
}

function preloadimgsrc(){
	if(!document.getElementById) return;
	var it=document.getElementsByTagName('IMG');
	var it2=document.getElementsByTagName('INPUT');
	preloader(it);
	preloader(it2);
}

if(window.addEventListener){window.addEventListener("load", preloadimgsrc, false);} 
else{
	if(window.attachEvent){window.attachEvent("onload", preloadimgsrc);}
	else{if(document.getElementById){window.onload=preloadimgsrc;}}
}







///////////////////////////////////////////////////////////////////////////
// Text Box with Limitation
//////////////////////////////////////////////////////////////////////////



function textCounter(field,counter,maxlimit,linecounter) {
	// text width//
	var fieldWidth =  parseInt(field.offsetWidth);
	var charcnt = field.value.length;        

	// trim the extra text
	if (charcnt > maxlimit) { 
		field.value = field.value.substring(0, maxlimit);
	}

	else { 
	// progress bar percentage
	var percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ;
	document.getElementById(counter).style.width =  parseInt((fieldWidth*percentage)/100)+"px";
	document.getElementById(counter).innerHTML="Limit: "+percentage+"%"
	// color correction on style from CCFFF -> CC0000
	setcolor(document.getElementById(counter),percentage,"background-color");
	}
}

function setcolor(obj,percentage,prop){
	obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)";
}




///////////////////////////////////////////////////////////////////////////
// Search Box Color Change
//////////////////////////////////////////////////////////////////////////

// Choose a coloring effect by configuering the variable fade-effect below:
// Set 1 if the background should fade from dark to medium and back to dark
// Set 2 if the background should fade from light to medium and back to light
// Set 3 if the background should fade from light to dark and back to light
// Set 4 if the background should fade from light to very light and back to light
// Set 5 if the background should fade from dark to very dark and back to dark
var fade_effect=4

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////

var eventobj=false
var timer
var previouscolor
var ns6=document.getElementById&&!document.all
if (fade_effect==1) {
	var darkmax=1
	var lightmax=127
}

if (fade_effect==2) {
	var darkmax=127
	var lightmax=254
}

if (fade_effect==3) {
	var darkmax=1
	var lightmax=254
}

if (fade_effect==4) {
	var darkmax=180
	var lightmax=254
}

if (fade_effect==5) {
	var darkmax=1
	var lightmax=80
}
var hexc = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F')

var redrgb=lightmax
var greenrgb=lightmax
var bluergb=lightmax

var redcol_1
var redcol_2 
var greencol_1 
var greencol_2 
var bluecol_1 
var bluecol_2 
 
var stepmax=15
var stepred=Math.ceil(stepmax*Math.random())
var stepgreen=Math.ceil(stepmax*Math.random())
var stepblue=Math.ceil(stepmax*Math.random())

function setrandomstep() {
	stepred=Math.ceil(stepmax*Math.random())
	stepgreen=Math.ceil(stepmax*Math.random())
	stepblue=Math.ceil(stepmax*Math.random())
}

function makedarker() {
	redrgb-=stepred
	greenrgb-=stepgreen
	bluergb-=stepblue
	if (redrgb<darkmax) {redrgb=darkmax}
	if (greenrgb<darkmax) {greenrgb=darkmax}
	if (bluergb<darkmax) {bluergb=darkmax}
	if (redrgb>darkmax || greenrgb>darkmax || bluergb>darkmax) {
      	redcol_1 = hexc[Math.floor(redrgb/16)];
     	redcol_2 = hexc[redrgb%16];
	 	greencol_1 = hexc[Math.floor(greenrgb/16)];
      	greencol_2 = hexc[greenrgb%16];
	  	bluecol_1 = hexc[Math.floor(bluergb/16)];
      	bluecol_2 = hexc[bluergb%16];
	  	var backcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
        eventobj.style.backgroundColor=backcolor
		timer=setTimeout("makedarker()",20);
    } 
  	else {
  		clearTimeout(timer)
		setrandomstep()
		setTimeout("makelighter()",20)
  	}
}

function makelighter() {
	redrgb+=stepred
	greenrgb+=stepgreen
	bluergb+=stepblue
	if (redrgb>=lightmax) {redrgb=lightmax}
	if (greenrgb>=lightmax) {greenrgb=lightmax}
	if (bluergb>=lightmax) {bluergb=lightmax}
	
	if (redrgb<lightmax || greenrgb<lightmax || bluergb<lightmax) {
      	redcol_1 = hexc[Math.floor(redrgb/16)];
     	redcol_2 = hexc[redrgb%16];
	 	greencol_1 = hexc[Math.floor(greenrgb/16)];
      	greencol_2 = hexc[greenrgb%16];
	  	bluecol_1 = hexc[Math.floor(bluergb/16)];
      	bluecol_2 = hexc[bluergb%16];
	  	var backcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
        eventobj.style.backgroundColor=backcolor
		timer=setTimeout("makelighter()",20);
    } 
  	else {
  		clearTimeout(timer)
		setrandomstep()
		setTimeout("makedarker()",20)
  	}
}

function animate(e) {
    if (document.all) {
        if (eventobj) {
            eventobj.style.backgroundColor=previouscolor
        }
        clearTimeout(timer)
        eventobj=   event.srcElement
        previouscolor= eventobj.style.backgroundColor
        makedarker()
    }
}

function stopit() {
    if (document.all) {
        clearTimeout(timer)
        eventobj.style.backgroundColor=previouscolor
    }
}












/**
  * You may use this code for free on any web page provided that 
  * these comment lines and the following credit remain in the code.
  * Multimedia Rollovers from http://www.javascript-fx.com
  */
//Uncomment the next line for random transition rollover each time the page is loaded
document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=1, transition='+Math.floor(Math.random()*23)+') }</STYLE>');

//Uncomment the next line for a specific transition rollover (transition=0 to 23)
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=1,transition=2) }</STYLE>');

//Uncomment the next line for fading rollovers
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=1) }</STYLE>');

var onImages=new Array();
function Rollover(imgName, imgSrc)
{
	onImages[imgName] = new Image();
	onImages[imgName].src = imgSrc;
}
function turnOn(imgName) 
{ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].stop();
	document.images[imgName].offSrc = document.images[imgName].src;
	document.images[imgName].src    = onImages[imgName].src;
} 
function turnOff(imgName) 
{ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].apply();
	document.images[imgName].src = document.images[imgName].offSrc;
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].play();
} 
Rollover("home",    "images/2_10.jpg");
Rollover("about",    "images/2_12.jpg");
Rollover("products",    "images/2_14.jpg");
Rollover("form",    "images/2_18.jpg");
Rollover("email",    "images/2_20.jpg");
Rollover("contact",    "images/2_16.jpg");
<!--


