// CustomShopScript.js         changeClass       windowWidth         checkCR




function changeClass(id,cName)
{
	if (document.getElementById)
	{	
		var object = document.getElementById(id);	
	}
	else if (document.all)
	{	
		var object = document.all[id];	
	}
	else return;
	object.className=cName;
}

var wWidthFlag = false;

function windowWidth(flag)
{

	if (wWidthFlag) return '';

	wWidthFlag = true;
	var winWidth;
	var winHeight;
	var elementById = '';
	var temp;
	if (!document.getElementById)
	{ 
		if (flag == '/')
		{	elementById = 'ElByIdNo'; }
		else
		{ elementById = '&getElementByID=No';}
	}
	if (self.innerWidth)
	{ winWidth = self.innerWidth; winHeight = self.innerHeight; }
	else if (document.documentElement && document.documentElement.clientWidth)
	{ winWidth = document.documentElement.clientWidth; 
		winHeight = document.documentElement.clientHeight; }
	else if (document.body)
	{ winWidth = document.body.clientWidth;  winHeight = document.body.clientHeight;}
	else return elementById;
	if (flag == '/')
	{	temp = 'Vhmcnv'+winWidth+'x'+winHeight; }
	else
	{ temp = '&WindowWidth='+winWidth+'&WindowHeight='+winHeight;}
	return elementById+temp;
}



  function checkCR(evt) {
    var evt  = (evt) ? evt : ((event) ? event : null);
    var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
    if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
  }
  document.onkeypress = checkCR;
