// JavaScript Document
function getElement(psID) {
   if(document.all) {
      return document.all[psID];
   } else if(document.getElementById) {
      return document.getElementById(psID);
   } else {
      for (iLayer = 1; iLayer < document.layers.length; iLayer++) {
         if(document.layers[iLayer].id == psID)
            return document.layers[iLayer];
      }
   }
   return null;
} 

function LQI( qid ) {
	var imgString = 'quote_' + qid + '-' + document.qiForm.iid.value + '-' + document.qiForm.fid.value + '-' + document.qiForm.fs.value + '.jpg';
	document.images.quoteImage.src = "http://www.quoteaddiction.com/imgs/" + imgString;

	var imgBox = getElement('imgCode');
	imgBox.value = '<a href="http://www.quoteaddiction.com"><img src="http://www.quoteaddiction.com/imgs/' + imgString + '" border=0></a>';
}

function highlightBox( num ) {
	for ( count = 1; count <= 12;  count++ ) {
		var box = getElement( 'preBG' + count ).style;

		if ( count == num )	
			box.border = '1px solid red;';
		else
			box.border = '1px solid white;';
	}

}

function highlightFont( num ) {
	for ( count = 1; count <= 11;  count++ ) {
		var img = getElement('preF' + count).style;

		if ( count == num )	
			img.border = '1px solid red;';
		else
			img.border = '1px solid white;';
	}

}

function highlightSize( num ) {
	for ( count = 1; count <= 4;  count++ ) {
		var box = getElement('preS' + count).style;

		if ( count == num )	
			box.border = '1px solid red;';
		else
			box.border = '1px solid white;';
	}

}

function toggleLayer(whichLayer)
{
	var style2 = getElement(whichLayer).style;
	style2.display = style2.display? "":"block";
}