// 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 Notice(num) {
//	var url="./notice-read.asp?num="+num;
	var url = "/bbs/notice/read.asp?TblName=notice&MenuID=home&Page=1&Num=" + num;
//	window.open(url,"_blank","width=700,height=500,resizable=1,scrollbars=yes,toolbar=0,status=0");

	location.href = url;
}

function OpenTip(tblname,num) {
	var url="./tip-read.asp?name="+tblname+"&num="+num;
	window.open(url,"_blank","width=600,height=500,resizable=1,scrollbars=yes,toolbar=0,status=0");
}

function mytip()
	{
	window.open("bbs/tipmyself/list.asp?name=tipmyself","_blank","width=660,height=500,resizable=1,scrollbars=yes,toolbar=0,status=0");
}

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 RecWindow()
	{
	window.open("/recmail/person-form.htm","_blank","width=380,height=350,resizable=1,scrollbars=0,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 SendMail(name, email, subject){
	name	= escape(name);
	email	= escape(email);
	subject	= escape(subject);
	window.open("/webmail/mail-front.asp?rec_name="+name+"&rec_email="+email+"&subject="+subject,"_blank","width=600,height=450");
}

function ResearchWindow() { 
	if (getCookie("blnEvent") != "true") 
		window.open("/research/temporary/about_lecture_form.asp", "_blank", "width=616,height=600,resizable=0,scrollbars=1");
}

function openwin(url){
 var strUrl = url;
 window.open(strUrl+"?startPoint=tiptech",'_blank',"resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,width=650,height=670,menubar=no,left=250,top=65"); 
}

function gocobuy(){
	var filename='http://www.enmarket.co.kr/tp/buynow/boomboom/prd_list.asp?tpcode=S0000010&displayID=15501'
	window.open(filename , 'BoomBoom','toolbar=0,location=0,directories=0,status=0,menubar=0, scrollbars=1,width=725, resizeable=yes, copyhistory=0');
}


// ·Ñ¸µ ¹è³Ê

bannum=Math.round(Math.random()*3)+1

if      (bannum==1)
{
var image="/img/banner/shop/special_06.gif width=468 height=60 border=0"
var link="/shop/special.asp"
}

else if (bannum==2)
{
var image="/img/banner/shop/book.gif width=468 height=60 border=0"
var link="/shop/bigmain/main.asp?Mode=Big&BigCode=5&BigName=%uCEF4%uD4E8%uD130%20%uC11C%uC801"
}

else if (bannum==3)
{
var image="/img/banner/shop/jsp_mudda.gif width=468 height=60 border=0"
var link="/shop/product/product.asp?ProductCode=0000001472"
}

else if (bannum==4)
{
var image="/img/banner/shop/win2000_server.gif width=468 height=60 border=0"
var link="/shop/product/product.asp?ProductCode=0000000270"
}
