현재위치 : HOME > 이벤트 |
|
function scroll( param )
{
if ( flag )
{
for (i=0;i<2;i++)
{
temp++;
tmp = document.getElementById('scroll_area'+i).style;
if( param=='top' )
{
tmp.top = parseInt(tmp.top)+tospeed;
}
else if( param=='bottom' )
{
tmp.top = parseInt(tmp.top)-tospeed;
}
if( parseInt(tmp.top) >= 1 )
{
if( i==0 ) tmp2 = document.getElementById('scroll_area1').style;
else tmp2 = document.getElementById('scroll_area0').style;
if( parseInt(tmp2.top) > 0 )
{
tmp2.top = height*(-1);//-171
}
}
if (parseInt(tmp.top) <= height*(-1))
{
tmp.top = height*(ctnt.length-1);
}
if( temp>=amount ) { flag=false; temp=0; }
}
window.setTimeout("scroll('"+param+"')", 1);
}
}
//탑 버튼
function scroll_Top()
{
if( !flag )
{
flag=true; scroll('top');
}
}
//아래쪽 버튼
function scroll_Down()
{
if( !flag )
{
flag=true; scroll('bottom');
}
}
//상품 div 테그안에 만들기
function startText()
{
document.write(" ");
for (i=0; i<2; i++)
insertText(i);
document.write(" ");
}
function insertText(i) {
htmlstr="\n";
htmlstr+=ctnt[i]+'\n'+' \n';
document.write(htmlstr);
}
//쿠키가저오기
function getToDayProductsCookieQuick(name)
{
var Found = false;
var start, end;
var i = 0;
while (i <= [안내]태그제한으로등록되지않습니다-document.cookie.length)
{
start = i;
end = start + name.length;
if ([안내]태그제한으로등록되지않습니다-document.cookie.substring(start, end) == name)
{
Found = true;
break;
}
i++;
}
if (Found == true)
{
start = end + 1;
end = [안내]태그제한으로등록되지않습니다-document.cookie.indexOf(';', start);
if (end < start) end = [안내]태그제한으로등록되지않습니다-document.cookie.length;
return unescape([안내]태그제한으로등록되지않습니다-document.cookie.substring(start, end));
}
return '';
}
//즐겨찾기
function bookmark(){
window.external.AddFavorite('http://www.pororo.co.kr', '뽀로로몰')
}
|
|
|
|
|
|
|
|
var htmlstr = "", flag=false, tospeed=2, temp=0, amount=57, height=0, divheight=0;
var ctnt=new Array();
ctnt[0]="";
ctnt[1]="";
var TodayProducts = "";
var Product = new Array();
var ProdNo = "";
var ProdImgUrl = "";
//var regexp1 = /%24/g;
//var regexp2 = /%3A/g;
//var regexp3 = /%2C/g;
TodayProducts = getToDayProductsCookieQuick('TodayProducts');
//alert('리플레이스전=' + TodayProducts);
//TodayProducts = TodayProducts.replace(regexp1, "$");
//alert('리플레이스$' + TodayProducts);
//TodayProducts = TodayProducts.replace(regexp2, ":");
//alert('리플레이스:' + TodayProducts);
//TodayProducts = TodayProducts.replace(regexp3, ",");
//alert('리플레이스,' + TodayProducts);
//alert('리플레이스후=' + TodayProducts);
TodayProducts = TodayProducts.substring(0 ,TodayProducts.length-1);
if(TodayProducts != "")//쿠키가 있는경우에만
{
//alert('오늘본상품='+TodayProducts);
Product = TodayProducts.split(','); //상품번호 $ 상품이미지URL
//alert('상품정보=' + Product[0])
//document.getElementById("lblProdCnt").value = Product.length;
//alert(document.getElementById("lblProdCnt").value);
for ( i=Product.length-1; i >= 0; i-- )//상품에 수만큼
{
ProdNo = Product[i].split('$')[0];
ProdImgUrl = Product[i].split('$')[1];
//alert(i+1+'번째 상품번호=' + ProdNo);
//alert(i+1+'번째 url=' + ProdImgUrl);
ctnt[0]+="";
ctnt[1]+="";
}
height = 57*(Product.length); //상품의 수로 div테그의 높이를 정하고
//divheight = 57*(Product.length); //상품의 수로 div테그의 높이를 정하고
divheight = (height > 174 ? 174: height); //상품이 3개 이상인 경우는 안보이게 한다
}
ctnt[0]+=" | ";
ctnt[1]+=" | ";
startText();
|
| |
|
| |
|