
//--------------------------------------------------------------
function awButtonSubmit(id1, event)
{
    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (keyCode == 13 || keyCode == 3) 
    {
		event.returnValue=false;
		id1.returnValue=false;
	   	id1.click();
		if (document.all && document.getElementById)
		{
		}
	}
}  

//--------------------------------------------------------------
function awDualButtonSubmit(id1, id2, event)
{
    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (keyCode == 13 || keyCode == 3) 
    {
		event.returnValue=false;
		if (id1 != undefined)
		{
			id1.returnValue=false;
	   		id1.click();
	   	}
	   	else if (id2 != undefined)
	   	{
			id2.returnValue=false;
	   		id2.click();
	   	}
	}
}  

//--------------------------------------------------------------
function SetQSBox(Obj, Val)
{
    obj.value = Val;
}  


var isInput;

//--------------------------------------------------------------
function IsInputSubmit()
{
	if (isInput)
	{
		return true;
	}
	else
	{
		return false;
	}
}  

var isQSInput;

//--------------------------------------------------------------
function awQSClick(rootpath, Keywords, InitialValue)
{

	if (isQSInput)
	{
		isQSInput=true;
		if (Keywords.value == InitialValue)
		{
			document.location = rootpath + "/Default.aspx?sID=5";
		}
		else
		{
		isInput = true;
		}
	}
	else
	{
		return false;
	}
	
}  

//--------------------------------------------------------------
function awPopUpWindow(url, target, features) {
	//"location=0,  statusbar=0,  menubar=0,  width=800,  height=300";
  	var theWindow =
    window.open(url, target, features);
 	theWindow.focus();
  	return theWindow;
}

//--------------------------------------------------------------	
function awOpenMailWin(x, y, params) 
{
	if (params =="")
		window.open(x,y,'status=no,scrollbars=no,resizable=no,width=400,height=425');
	else
		window.open(x, y, params);
}

//--------------------------------------------------------------	
function randselect() 
{							
	do 
	{												
		i=Math.floor(Math.random()*item.length); 
	}
	while(typeof(item[i])=="undefined");	
	return i;								
}

//--------------------------------------------------------------	
function randselect1() 
{							
	do 
	{												
		i=Math.floor(Math.random()*item1.length); 
	}
	while(typeof(item1[i])=="undefined");	
	return i;								
}

//--------------------------------------------------------------  

function awHomeRandomImage(ID) 
{
      document.write("<p>" + ID + "</p>");
}
//--------------------------------------------------------------  
function awHomeRotImage(ID, imgAlt, ImgID) 
{
	document.write("<img id='"+ ImgID +"' src='" + ID + "' alt='" + imgAlt + "' />");
}
//--------------------------------------------------------------  

function awHomecasestudiesImage(SecTitle, SecID, SeclID, Img1oID, Img1lID, Img1Alt, Img2oID, Img2lID, Img2Alt) 
{           
      document.write("<a href='default.aspx?sID=" + SecID + "&lID=" + SeclID + "' Title='" + SecTitle + "'>");
      document.write("<img src='/fileserver.aspx?oID=" + Img1oID+ "&lID=" + Img1lID + "' alt='" + Img1Alt + "'/>");
      document.write("<span><img src='/fileserver.aspx?oID=" + Img2oID+ "&lID=" + Img2lID + "' alt='" + Img2Alt + "'/></span>");
      document.write("</a>");

}

