﻿



function quangcaophai(id_)
{

    
}
  
  
  
  function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/;";
}
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;

}
function eraseCookie(name) {
	if ( readCookie( name ) )
	{	    
	     document.cookie = name + "=" +";path=/;expires=Thu, 01-Jan-1900 00:00:01 GMT";
	}
}
  // JScript File
function ShowListCity()
{
    content_ = "";
    for(i=0;i<ArrayID.length;i++)
    {
        content_+="<option value='"+ArrayID[i].toString()+"'>"+ArrayName[i].toString()+"</option>";
    }
    document.write(content_);
}

function ShowLinkCity()
{
    top.location.href='listnews.aspx?cityid=' +  document.getElementById('topprovince').value;
}
function SearchTop()
{
    key = document.getElementById('txtkeysearch');
    if(key!=null)
    {
        top.location.href='listnews.aspx?key='+key.value;
    }
    else{
        alert('Vui lòng nhập từ khóa để tìm kiếm');
        key.focus();
        return false;
    }
}
 function submitenterheader(myfield,e)
    {
		var keycode;
		if (window.event) keycode = window.event.keyCode;
		else if (e) keycode = e.which;
		else return true;

		if (keycode == 13)
		{
		var pagexxx  = document.location.href;
		SearchTop();
		
		return false;
		}
		else
		return true;
}
