// tiptech home

function printDate() {	
	var date = new Date();
	var day  = date.getDate();
	var month = date.getMonth() + 1;
	var year = date.getYear();
	var weekday = date.getDay();
	
	year = (year < 1000) ? year + 1900 : year;
	
	if (weekday==0)
		weekday = "(ÀÏ)"
	else if (weekday==1)
		weekday = "(¿ù)"
	else if (weekday==2)
		weekday = "(È­)"
	else if (weekday==3)
		weekday = "(¼ö)"
	else if (weekday==4)
		weekday = "(¸ñ)"
	else if (weekday==5)
		weekday = "(±Ý)"
	else if (weekday==6)
		weekday = "(Åä)"
	else
	    weekday = ""
		
	document.write(year + "³â "+ month + "¿ù " + day + "ÀÏ " + weekday)
	}

function Chat() {
	window.open("/chatting/client/Client_Wait.asp","_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=570,height=430");
}
	
function engdic()
	{
	window.open("http://www.tiptech.net/dictionary/dictionary.htm","_blank","width=650,height=550,resizable=1,scrollbars=yes,toolbar=0,status=0");
}

function book() {
newwin = window.open("./lecture/flash/publish/flash_book.html","newwindow","height=500,width=560,location=0,menubar=0,resizable=0,scrollbars=yes,status=0,titlebar=0,toolbar=0")
}

function chatv()
	{
	window.open("http://www.ninetails.co.kr/smi_05.htm","_blank","width=750,height=404,resizable=1,scrollbars=yes,toolbar=0,status=0");
}

function help()
	{
	window.open("./search/help.html","_blank","width=450,height=450,resizable=1,scrollbars=yes,toolbar=0,status=0");
}


//ÄíÅ°°ªÀ» °¡Á®¿À´Â ÇÔ¼ö
function getCookie(name) {
   var from_idx = document.cookie.indexOf(name+'=');
   if (from_idx != -1) { 
      from_idx += name.length + 1
      to_idx = document.cookie.indexOf(';', from_idx) 

      if (to_idx == -1) {
            to_idx = document.cookie.length
      }
      return unescape(document.cookie.substring(from_idx, to_idx))
   }
}

function CheckSpaces(strValue) {
	var flag=true;

	if (strValue!="") {
		for (var i=0; i < strValue.length; i++) {
			if (strValue.charAt(i) != " ") {
				flag=false;
				break;
			}
		}
	}
	return flag;
}

function CheckValues()
{
  if(CheckSpaces(document.form1.SearchString.value)) return false;
  else return true;
}

function CheckValues_()
{
  if(!CheckSpaces(document.form1.SearchString.value)) document.form1.submit();

}


var favoriteurl="http://www.pufs.ac.kr/~yslee"
var favoritetitle="Wylie's Home"

function addfavorites()
{
if (document.all)
	window.external.AddFavorite(favoriteurl,favoritetitle)
else
	window.alert('IE¿¡¼­¸¸ °¡´ÉÇÕ´Ï´Ù.');
}
function check()
{
if (!document.all)	window.alert('IE¿¡¼­¸¸ °¡´ÉÇÕ´Ï´Ù.');
}
