function showCompany(ddCompanies)
{
	var sURL = ddCompanies.SelectedItem.CustomAttributes.Value;
	document.location.href=sURL;
}

function getColorsPalate()
{
		
	wind1 = window.open('/GCA/Colors.aspx?','popWindow');
			
		
}

function createSearchEvent(url, obj)
{
    // In Case Of Pressing Enter Perform Search			
    if(event.keyCode == 13)
    {	
      //  var txtField = document.getElementById('txtSearchPhrase');
        
		if (obj != null && obj.value != '')
		{
			location.assign(url + escape(obj.value));
		}
        return false;
    }
    
}
function GoToSearch(url, obj)
{
	var txtField;
	txtField = document.getElementById(obj);
	if (txtField != null && txtField.value != '')
	{
		location.assign(url + escape(txtField.value));
	}
}

function Enter_Key_pressed(comboBox, eventArgs)
{
if (eventArgs.keyCode == 13)
{
//alert(comboBox.SelectedItem.Value)
//alert(comboBox.SelectedItem) 
//alert(comboBox.SelectedIndex) 
 
}
	 if (eventArgs.keyCode == 13 && comboBox.SelectedItem != null)
	 {
		location.assign(comboBox.SelectedItem.Value);
	 }
	// else if (eventArgs.keyCode == 13)
	// {
	//	location.assign("/gca/");
	// }
	 else
	 {
		return false;
	 }
	 
}
//comboBox.SelectedItem != null

// confirming the delete action does not invoke a delete action,
// it sends relevant information in the querystring,
// and the decision whether to use this info or not is taken in the server side 


// confirming the delete action does not invoke a delete action,
// it sends relevant information in the querystring,
// and the decision whether to use this info or not is taken in the server side 
function confirmHTMLPlaceHolderDelete(msg,deleteHTMLPlaceholderGuid,id){
 if (confirm(msg)){
  var curUrl = document.location.href;
  curUrl += "&deleteHTMLPlaceholderGuid="+deleteHTMLPlaceholderGuid+"&PlaceHolderDefenitionID="+id;
  document.location.href=curUrl;
 }
 else return false;
}


