var aConfig = new Array();

aConfig['WindowDescriptionWidth'] = 290;

function GoUrl(sUrl)
{
	location = sUrl;
}
function ChangeClass(oObject,sMode)
{
	switch (sMode)
	{
		case 'on':
			oObject.className = 'catalogOn';
			oObject.style.backgroundImage = 'url('+srcImagePath+'catalog_bg.gif)';
		break;
		case 'off':
			oObject.className = 'catalogOff';
			oObject.style.backgroundImage = '';
		break;
	}
}

onload = function()
{
	for(i=0;i<document.getElementsByTagName("div").length;i++)
	{
		if (document.getElementsByTagName("div")[i].id.indexOf('idPreview') != -1)
		{
			document.getElementsByTagName("div")[i].onmouseout = function()
			{
				document.getElementById('idDescription').style.display	= "none";
			}
			document.getElementsByTagName("div")[i].onmousemove = ShowDescription
		}
	}
}

function loadXML(sRequestUrl) {
    var oRequest;
    var fileContent;
    // branch for IE/Windows ActiveX version
    if (window.ActiveXObject) {
        oRequest = new ActiveXObject("Microsoft.XMLHTTP");
        oRequest.open("GET", sRequestUrl, false);
        oRequest.onreadystatechange = function()
        						{
                                    if (oRequest.readyState == 4) {
                                        fileContent = oRequest.responseXML;
                                    }
                                }
        oRequest.send(null);
    // branch for native XMLHttpRequest object
    } else if (window.XMLHttpRequest) {
        oRequest = new XMLHttpRequest();
        oRequest.open("GET", sRequestUrl, false);
        oRequest.send(null);
        fileContent = oRequest.responseXML;
    }
    return fileContent;
}

function ShowDescription(event)
{
	document.getElementById('idDescription').style.display	= "block";
	document.getElementById('idDescription').innerHTML		= document.getElementById(this.id).innerHTML;
	if (window.event) {
		shiftY = window.event.y+15+document.body.scrollTop;
		shiftX = window.event.x+10+document.body.scrollLeft;
		if (document.body.offsetWidth <= shiftX + aConfig['WindowDescriptionWidth'] + 30)
		{
			shiftX = document.body.offsetWidth - document.body.scrollLeft - aConfig['WindowDescriptionWidth'] - 30;
		}
	} else {
		shiftY = event.pageY+15;
		shiftX = event.pageX+15;
		if (document.body.offsetWidth <= shiftX + aConfig['WindowDescriptionWidth'] + 15)
		{
			shiftX = document.body.offsetWidth - aConfig['WindowDescriptionWidth'] - 15;
		}
	}
    document.getElementById('idDescription').style.top	= shiftY;
	document.getElementById('idDescription').style.left	= shiftX;
}

var oImage = new Image();

function InitBigImage(sImage)
{
	document.getElementById('idBigImage').src = srcImagePath+'spacer.gif';

	oImage = new Image();
	oImage.onload = function()
	{
		document.getElementById('idBigImage').src = oImage.src;
		ResizeImage('idBigImage',oImage.width,oImage.height);
	};
	oImage.src = sImage;

	return false;
}

function ChangeBigImage(iImageID,bBigImage)
{
	document.getElementById('idBigImage').src = srcImagePath+'spacer.gif';

	oImage = new Image();
	oImage.onload = function()
	{
		document.getElementById('idBigImage').src = oImage.src;
		ResizeImage('idBigImage',oImage.width,oImage.height);
	};
	oImage.src = sImagePath+'addmimage'+iImageID+'.jpg';

	if ('y' == bBigImage)
	{
		document.getElementById('idMoreImage').innerHTML = '<a href="'+sImagePath+'addbimage'+iImageID+'.jpg" target="_blank">view larger image >></a>';
	}
	return false;
}

var iResizeStep = 10;

function ResizeImage(sImageId,iWidth,iHeight)
{
	if(document.getElementById(sImageId).width != iWidth && document.getElementById(sImageId).height != iHeight)
	{
		if (document.getElementById(sImageId).width > iWidth)
		{
			document.getElementById(sImageId).width -= iResizeStep;
			if (document.getElementById(sImageId).width < iWidth)
			{
				document.getElementById(sImageId).width = iWidth;
			}
		}
		if (document.getElementById(sImageId).width < iWidth)
		{
			document.getElementById(sImageId).width += iResizeStep;
			if (document.getElementById(sImageId).width > iWidth)
			{
				document.getElementById(sImageId).width = iWidth;
			}
		}
		if (document.getElementById(sImageId).height > iHeight)
		{
			document.getElementById(sImageId).height -= iResizeStep;
			if (document.getElementById(sImageId).height < iHeight)
			{
				document.getElementById(sImageId).height = iHeight;
			}
		}
		if (document.getElementById(sImageId).height < iHeight)
		{
			document.getElementById(sImageId).height += iResizeStep;
			if (document.getElementById(sImageId).height > iHeight)
			{
				document.getElementById(sImageId).height = iHeight;
			}
		}
		setTimeout("ResizeImage('" + sImageId + "', '"+ iWidth +"', '"+ iHeight +"')", 1);
	}
}

function ChangeZipCode(oObject)
{
	if (oObject)
	{
		oObject.href = 'javascript:void(0);';
	}
	var sUrl = '/index.php?getXML=true&sType=orders&sAction=resetZipCode';
	var xmlResponse = loadXML(sUrl);
	if (xmlResponse.getElementsByTagName('Status').item(0).childNodes.item(0).data == 1)
	{
		document.getElementById('idFormDelivery').style.display	= "block";
		document.getElementById('idDivDelivery').style.display	= "none";
	}
	else
	{
		document.getElementById('idDivDelivery').innerHTML = 'Error';
	}
	return false;
}

function SendFormDelivery()
{
	var aParams = new Array('ZipCode','ItemID','ItemType');
	var sUrl = '/index.php?getXML=true&sType=orders&sAction=getDistance';
	for (i=0;i<aParams.length;i++)
	{
		sUrl += '&'+document.getElementById(aParams[i]).name+'='+document.getElementById(aParams[i]).value;
	}
	var xmlResponse = loadXML(sUrl);
	if (xmlResponse.getElementsByTagName('Status').item(0).childNodes.item(0).data == 1)
	{
		document.getElementById('idShippingPrice').innerHTML = '$ '+xmlResponse.getElementsByTagName('ShippingPrice').item(0).childNodes.item(0).data;
		document.getElementById('idFormDelivery').style.display	= "none";
		document.getElementById('idDivDelivery').style.display	= "block";
	}
	else
	{
		document.getElementById('idFormDelivery').innerHTML = 'Error';
	}

	return false;
}

function SetFilter(oObject) {
	var oTable = oObject.parentNode.parentNode;
	oTable.getElementsByTagName('select')
	for (i=0;i<oTable.getElementsByTagName('select').length;i++)
	{
		switch(oTable.getElementsByTagName('select')[i].name) {
			case 'VENDOR':
				var sVENDOR = oTable.getElementsByTagName('select')[i].value;
			break;
			case 'ORDERBY':
				var sORDERBY = oTable.getElementsByTagName('select')[i].value;
			break;
			case 'LIMIT':
				var sLIMIT = oTable.getElementsByTagName('select')[i].value;
			break;
		}
	}
	window.location = './['+sVENDOR+']['+sORDERBY+']['+sLIMIT+'][1]';
}

function initMaterial(strElementID) {
	if (document.getElementById(strElementID).addEventListener) {
		document.getElementById(strElementID).onmousemove = function() {return true;}

		document.getElementById(strElementID).addEventListener("click", changeStyle, false);
		document.getElementById(strElementID).addEventListener("mousemove", ShowMaterial, false);
		document.getElementById(strElementID).addEventListener("mouseout", HideMaterial, false);
	} else {
		document.getElementById(strElementID).onclick=changeStyle;
		document.getElementById(strElementID).onmousemove=ShowMaterial;
		document.getElementById(strElementID).onmouseout=HideMaterial;
	}
}

function changeStyle() {
	if (this.getAttribute('propertyPrice') && document.getElementById('idsPrice')) {
		fltPrice = this.getAttribute('propertyPrice');
		changePrice();
	}
	for (i=0;i<this.parentNode.parentNode.parentNode.getElementsByTagName('div').length;i++) {
		if (this.parentNode.parentNode.parentNode.getElementsByTagName('div')[i] != this && this.parentNode.parentNode.parentNode.getElementsByTagName('div')[i].className.indexOf('classSelMaterial') != -1) {
			this.parentNode.parentNode.parentNode.getElementsByTagName('div')[i].className = this.parentNode.parentNode.parentNode.getElementsByTagName('div')[i].className.replace(' classSelMaterial','');
			if (this.parentNode.parentNode.parentNode.getElementsByTagName('div')[i].getAttribute('propertyPriceID'))
				document.getElementById('idsMaterialList').value = document.getElementById('idsMaterialList').value.toString().replace(this.parentNode.parentNode.parentNode.getElementsByTagName('div')[i].getAttribute('propertyPriceID')+'_','');
		}
	}

	if (this.className.indexOf('classSelMaterial') == -1) {
		this.className += ' classSelMaterial';
		if (this.getAttribute('propertyPriceID'))
			document.getElementById('idsMaterialList').value = document.getElementById('idsMaterialList').value + this.getAttribute('propertyPriceID') + '_';
	} else {
//		this.className = this.className.replace(' classSelMaterial','');
	}
}

function ShowMaterial(Evnt) {
	if (!document.getElementById('idMaterial')) {
		var objNewDiv = document.createElement('div');
		objNewDiv.setAttribute('id','idMaterial');
		objNewDiv.className = 'classMaterial';
		objNewDiv.style.top = '1820px';
		objNewDiv.style.left= '20px';
		document.body.appendChild(objNewDiv);
	}
	document.getElementById('idMaterial').style.display	= "block";
	document.getElementById('idMaterial').innerHTML		= '';
	if (this.getAttribute('propertyValue')) {
		document.getElementById('idMaterial').innerHTML	+= '<b>'+this.getAttribute('propertyValue')+'</b><br>';
	}
	if (this.getAttribute('propertyCode')) {
		document.getElementById('idMaterial').innerHTML	+= 'Code: '+this.getAttribute('propertyCode')+'<br>';
	}
	if (this.getAttribute('propertyPrice') && this.getAttribute('propertyPrice') != '0.00') {
		document.getElementById('idMaterial').innerHTML	+= 'Price: $'+this.getAttribute('propertyPrice')+'<br>';
	}
	if (window.event) {
		var shiftY = window.event.y+15+document.body.scrollTop;
		var shiftX = window.event.x+10+document.body.scrollLeft;
		if (document.body.offsetWidth <= shiftX + 30)
		{
			shiftX = document.body.offsetWidth - document.body.scrollLeft - 30;
		}
	} else {
		var shiftY = Evnt.pageY+15;
		var shiftX = Evnt.pageX+10;
		if (document.body.offsetWidth <= Evnt.pageX + 10)
		{
			shiftX = document.body.offsetWidth - 10;
		}
	}
	document.getElementById('idMaterial').style.top	= shiftY+'px';
	document.getElementById('idMaterial').style.left= shiftX+'px';
}
function HideMaterial(Evnt) {
	if (document.getElementById('idMaterial'))
		document.getElementById('idMaterial').parentNode.removeChild(document.getElementById('idMaterial'));
}
function DrawDependMatirial() {
	if (aDependList.length > 0 && document.getElementById('dependMaterialList')) {
		var intLevel  = aDependList[0][0];
		var intCurRow = 0;
		var strGrouName = new String();
		var aExistIn = new Array();

		var objMainDiv = document.createElement('div');
		objMainDiv.setAttribute('id','Level-1');

		var objNewDiv = document.createElement('div');
		objNewDiv.className = 'classFloatNone';
		
		var objNewSpan = document.createElement('span');
		objNewSpan.className = 'classPaddingLeft10';
		objNewSpan.innerHTML = '<b>'+aDependList[0][1]+'</b>';
		
		objNewDiv.appendChild(objNewSpan);
		objMainDiv.appendChild(objNewDiv);

		while(intCurRow < aDependList.length && intLevel == aDependList[intCurRow][0]) {
			if (!aExistIn[aDependList[intCurRow][12]]) {
				if (strGrouName != aDependList[intCurRow][13]) {
					if (strGrouName != '') {
						objMainDiv.appendChild(objGroupDiv);

						var objGroupDiv = document.createElement('div');
						objGroupDiv.className = 'classFloatLeft classWidth30';
						objGroupDiv.innerHTML = '&nbsp;';
						objMainDiv.appendChild(objGroupDiv);
					}
					strGrouName = aDependList[intCurRow][13];
	
					var objGroupDiv = document.createElement('div');
					objGroupDiv.className = 'classFloatLeft';
	
					var objNewSpan = document.createElement('span');
					objNewSpan.className = 'classPaddingLeft10';
					objNewSpan.innerHTML = aDependList[intCurRow][13];
	
					objGroupDiv.appendChild(objNewSpan);

					var objBr = document.createElement('br');
					objBr.setAttribute('clear','all');
					objGroupDiv.appendChild(objBr);
				}

				aExistIn[aDependList[intCurRow][12]] = 1;
				var objMaterialDiv = document.createElement('div');
				objMaterialDiv.className = 'classFloatLeft';
				objMaterialDiv.setAttribute('align', 'center');
		
				var objImgDiv = document.createElement('div');
				if (objImgDiv.addEventListener) {
//					objImgDiv.addEventListener("click", changeStyle, false);
					objImgDiv.addEventListener("click", DrawDependSubMatirial, false);
					objImgDiv.addEventListener("mousemove", ShowMaterial, false);
					objImgDiv.addEventListener("mouseout", HideMaterial, false);
				} else {
//					objImgDiv.attachEvent("onclick", changeStyle);
					objImgDiv.onclick=DrawDependSubMatirial;
					objImgDiv.onmousemove=ShowMaterial;
					objImgDiv.onmouseout=HideMaterial;
				}
				objImgDiv.className = 'classFloatLeft classHandbook classEvent';
				objImgDiv.setAttribute('propertyCode', aDependList[intCurRow][10]);
				objImgDiv.setAttribute('propertyValue', aDependList[intCurRow][11]);
				objImgDiv.setAttribute('propertyPrice', '');
				objImgDiv.setAttribute('propertyTLevel', aDependList[intCurRow][2]);
				objImgDiv.setAttribute('propertyFValueID', aDependList[intCurRow][7]);

				objImgDiv.setAttribute('propertyPrice', '');
		
				var objImg = document.createElement('img');
				objImg.setAttribute('src','/furniture_photo/'+aDependList[intCurRow][12]);
		
				objImgDiv.appendChild(objImg);
				objMaterialDiv.appendChild(objImgDiv);

				var objBr = document.createElement('br');
				objBr.setAttribute('clear','all');
				objMaterialDiv.appendChild(objBr);
				var objText = document.createTextNode(aDependList[intCurRow][11]);
				objMaterialDiv.appendChild(objText);
				objGroupDiv.appendChild(objMaterialDiv);
			}

			intCurRow++;
		}
		if (strGrouName != '') {
			objMainDiv.appendChild(objGroupDiv);

			var objGroupDiv = document.createElement('div');
			objGroupDiv.className = 'classFloatLeft classWidth30';
			objGroupDiv.innerHTML = '&nbsp;';
			objMainDiv.appendChild(objGroupDiv);
		}
		var objBr = document.createElement('br');
		objBr.setAttribute('clear','all');
		objMainDiv.appendChild(objBr);

		var objImg = document.createElement('img');
		objImg.setAttribute('src',srcImagePath+'spacer.gif');
		objImg.setAttribute('width','1');
		objImg.setAttribute('height','11');
		objMainDiv.appendChild(objImg);

		document.getElementById('dependMaterialList').appendChild(objMainDiv);
	}
}
function DrawDependSubMatirial() {
	if (this.getAttribute('propertyPrice') && document.getElementById('idsPrice')) {
		fltPrice = this.getAttribute('propertyPrice');
		changePrice();
	}
	if (this.getAttribute('propertyTLevel') && this.getAttribute('propertyFValueID')) {
		if (aDependList.length > 0 && document.getElementById('dependMaterialList')) {
			var intLevel  = this.getAttribute('propertyTLevel');
			var intCurRow = 0;
			var strGrouName = new String();
			var aExistIn = new Array();

			if (document.getElementById('Level-'+intLevel)) {
				var objLevel = document.getElementById('Level-'+intLevel).previousSibling;
				for (var i=0; i < objLevel.getElementsByTagName("div").length; i++) {
					if (objLevel.getElementsByTagName("div")[i].getAttribute('propertyPriceID'))
						document.getElementById('idsMaterialList').value = document.getElementById('idsMaterialList').value.toString().replace(objLevel.getElementsByTagName("div")[i].getAttribute('propertyPriceID')+'_','');
				}
				while (objLevel.nextSibling) {
					for (var i=0; i < objLevel.nextSibling.getElementsByTagName("div").length; i++) {
						if (objLevel.nextSibling.getElementsByTagName("div")[i].getAttribute('propertyPriceID'))
							document.getElementById('idsMaterialList').value = document.getElementById('idsMaterialList').value.toString().replace(objLevel.nextSibling.getElementsByTagName("div")[i].getAttribute('propertyPriceID')+'_','');
					}
					objLevel.parentNode.removeChild(objLevel.nextSibling);
				}
			}

			var objMainDiv = document.createElement('div');
			objMainDiv.setAttribute('id','Level-'+intLevel);
	
			var objNewDiv = document.createElement('div');
			objNewDiv.className = 'classFloatNone';
			
			var objNewSpan = document.createElement('span');
			objNewSpan.className = 'classPaddingLeft10';
			for (intCurRow = 0; intCurRow < aDependList.length; intCurRow++) {
				if (aDependList[intCurRow][2] == intLevel) {
					objNewSpan.innerHTML = '<b>'+aDependList[intCurRow][3]+'</b>';
					intCurRow = aDependList.length;
				}
			}

			intCurRow = 0;
			
			objNewDiv.appendChild(objNewSpan);
			objMainDiv.appendChild(objNewDiv);
	
			while(intCurRow < aDependList.length) {
				if (intLevel == aDependList[intCurRow][2] && this.getAttribute('propertyFValueID') == aDependList[intCurRow][7]) {
					if (!aExistIn[aDependList[intCurRow][16]]) {
						if (strGrouName != aDependList[intCurRow][17]) {
							if (strGrouName != '') {
								objMainDiv.appendChild(objGroupDiv);
		
								var objGroupDiv = document.createElement('div');
								objGroupDiv.className = 'classFloatLeft classWidth30';
								objGroupDiv.innerHTML = '&nbsp;';
								objMainDiv.appendChild(objGroupDiv);
							}
							strGrouName = aDependList[intCurRow][17];
			
							var objGroupDiv = document.createElement('div');
							objGroupDiv.className = 'classFloatLeft';
			
							var objNewSpan = document.createElement('span');
							objNewSpan.className = 'classPaddingLeft10';
							objNewSpan.innerHTML = aDependList[intCurRow][17];
			
							objGroupDiv.appendChild(objNewSpan);

							var objBr = document.createElement('br');
							objBr.setAttribute('clear','all');
							objGroupDiv.appendChild(objBr);
						}
		
						aExistIn[aDependList[intCurRow][16]] = 1;
						var objMaterialDiv = document.createElement('div');
						objMaterialDiv.className = 'classFloatLeft';
						objMaterialDiv.setAttribute('align', 'center');
				
						var objImgDiv = document.createElement('div');
						if (objImgDiv.addEventListener) {
//							objImgDiv.addEventListener("click", changeStyle, false);
							objImgDiv.addEventListener("click", DrawDependSubMatirial, false);
							objImgDiv.addEventListener("mousemove", ShowMaterial, false);
							objImgDiv.addEventListener("mouseout", HideMaterial, false);
						} else {
//							objImgDiv.attachEvent("onclick", changeStyle);
							objImgDiv.onclick=DrawDependSubMatirial;
							objImgDiv.onmousemove=ShowMaterial;
							objImgDiv.onmouseout=HideMaterial;
						}
						objImgDiv.className = 'classFloatLeft classHandbook classEvent';
						objImgDiv.setAttribute('propertyCode', aDependList[intCurRow][14]);
						objImgDiv.setAttribute('propertyValue', aDependList[intCurRow][15]);
						objImgDiv.setAttribute('propertyPrice', aDependList[intCurRow][9]);
						objImgDiv.setAttribute('propertyTLevel', new Number(aDependList[intCurRow][2]) + 1);
						objImgDiv.setAttribute('propertyFValueID', aDependList[intCurRow][8]);
						objImgDiv.setAttribute('propertyPriceID', aDependList[intCurRow][4]);
				
						var objImg = document.createElement('img');
						objImg.setAttribute('src','/furniture_photo/'+aDependList[intCurRow][16]);
				
						objImgDiv.appendChild(objImg);
						objMaterialDiv.appendChild(objImgDiv);
		
						var objBr = document.createElement('br');
						objBr.setAttribute('clear','all');
						objMaterialDiv.appendChild(objBr);
						var objText = document.createTextNode(aDependList[intCurRow][15]);
						objMaterialDiv.appendChild(objText);
						objGroupDiv.appendChild(objMaterialDiv);
					}
				}	
				intCurRow++;
			}
			if (strGrouName != '') {
				objMainDiv.appendChild(objGroupDiv);

				var objGroupDiv = document.createElement('div');
				objGroupDiv.className = 'classFloatLeft classWidth30';
				objGroupDiv.innerHTML = '&nbsp;';
				objMainDiv.appendChild(objGroupDiv);
			}
			var objBr = document.createElement('br');
			objBr.setAttribute('clear','all');
			objMainDiv.appendChild(objBr);
	
			var objImg = document.createElement('img');
			objImg.setAttribute('src',srcImagePath+'spacer.gif');
			objImg.setAttribute('width','1');
			objImg.setAttribute('height','11');
			objMainDiv.appendChild(objImg);
	
			document.getElementById('dependMaterialList').appendChild(objMainDiv);
		}
	}
	changeStyle.call(this);
}
var strPriMenuId = '';
var strOldMenuId = '';
function HideSubMenu(strDivId) {
	strOldMenuId = '';
	setTimeout('SetHideSubMenu('+strDivId+')', 1500);
}
function ShowSubMenu(strDivId) {
//	setTimeout(arg1, arg2)
	strOldMenuId = strDivId;
	SetShowSubMenu(strDivId);
}
function SetHideSubMenu(strDivId) {
	if (document.getElementById('idSubMenu'+strDivId) && strOldMenuId != strDivId) {
		document.getElementById('idSubMenu'+strDivId).style.display	= "none";
	}
}
function SetShowSubMenu(strDivId) {
	if (strPriMenuId != strDivId) {
		if (document.getElementById('idSubMenu'+strPriMenuId)) {
			document.getElementById('idSubMenu'+strPriMenuId).style.display	= "none";
		}
	}
	if (document.getElementById('idSubMenu'+strDivId)) {
		document.getElementById('idSubMenu'+strDivId).style.display	= "block";
	}
	strPriMenuId = strOldMenuId = strDivId;
}
function UnSetHideSubMenu(strDivId) {
	strOldMenuId = '';
	setTimeout('SetHideSubMenu('+strDivId+')', 1500);
}
function Convertor() {
	if (document.addEventListener) {
		addEventListener('load', DrawConvertor, false);
	} else if (document.attachEvent) {
		attachEvent('onload', DrawConvertor);
	}
}
function DrawConvertor() {
	if (document.getElementById('idDivHaveQuestions')) {
		var objDiv = document.createElement('div');
		var objBr = document.createElement('br');
		objDiv.appendChild(objBr);
		var objBold = document.createElement('b');
		var objText = document.createTextNode('Centimeters to inches conversion');
		objBold.appendChild(objText);
		objDiv.appendChild(objBold);

		var objTable = document.createElement('table');
		objTable.className = 'classConvertor';
		objTable.setAttribute('border', 0);
		objTable.setAttribute('cellpadding', 0);
		objTable.setAttribute('cellspacing', 0);
		var objRow = objTable.insertRow(0);
		var objCell = objRow.insertCell(0);
		var objText = document.createTextNode('Enter the centimeters value');
		objCell.appendChild(objText);

		var objCell = objRow.insertCell(1);
		var objInput = document.createElement('input');
		objInput.setAttribute('id', 'idConvertorInput');
		objInput.type = 'text';
		objInput.className = 'classConvertorInput';
		objInput.onchange = ConvertCurs;
		objCell.appendChild(objInput);

		var objCell = objRow.insertCell(2);
		var objInput = document.createElement('input');
		objInput.type = 'button';
		objInput.className = 'classConvertorButton';
		objInput.value = 'convert';
		objInput.onclick = ConvertCurs;
		objCell.appendChild(objInput);

		var objCell = objRow.insertCell(3);
		objCell.setAttribute('id', 'idConvertorOut');

		objDiv.appendChild(objTable);

		document.getElementById('idDivHaveQuestions').parentNode.insertBefore(objDiv, document.getElementById('idDivHaveQuestions'));
	}
}
function ConvertCurs() {
	document.getElementById('idConvertorOut').innerHTML = (Math.ceil(document.getElementById('idConvertorInput').value * 39.37)*0.01).toFixed(1) + ' inches';
}