function CaricaFoto(img,name,imgname,wid,hi){foto1=new Image();foto1.src=(img);foto2=new Image();foto2.src=(imgname);viewFotos(img,name,imgname,wid,hi);}
function viewFotos(img,name,imgname,wid,hi){features=
"toolbar=no,location=no,directories=no,status=no,menubar=no,"
+
"scrollbars=no,resizable=no,width="
+wid+
",height="
+hi;dlg=window.open (
""
,
"Details"
,features);if (dlg.document.innerHTML !=
""
){dlg.close();dlg=window.open (
""
,
"Details"
,features);}
dlg.document.write(
"<html><head><ti"
);dlg.document.write(
"tle>"
+name+
" Zoom</title></head>"
);dlg.document.write(
"<body bgcolor=white><center>"
);dlg.document.write(
"<table width=100% height=100%>"
);dlg.document.write(
"<tr><td align=center valign=middle>"
);dlg.document.write(
"<img src="
+imgname+
">"
);dlg.document.write(
"</td></tr><tr><td align=center valign=middle>"
);dlg.document.write(
"<img src="
+img+
">"
);dlg.document.write(
"</td></tr>"
);dlg.document.write(
"<tr><td align=center valign=middle>"
);dlg.document.write(
"<a href=# onClick=window.close();>"
);dlg.document.write(
"<font size=1 face=Arial>Click to close</font></a>"
);dlg.document.write(
"</td></tr>"
);dlg.document.write(
"</table></body></html>"
);}
function CaricaFoto(img,name,nameimg,wid,hi){foto1=new Image();foto1.src=(img);viewFotos(img,name,wid,hi);}
function viewFotos(img,name,wid,hi){features=
"toolbar=no,location=no,directories=no,status=no,menubar=no,"
+
"scrollbars=yes,resizable=yes,width="
+wid+
",height="
+hi;dlg=window.open (
""
,
"Details"
,features);dlg.document.write(
"<html><head><title>"
+name+
" Zoom</title><style>body { margin: 0 }</style></head>"
);dlg.document.write(
"<body bgcolor=white><center>"
);dlg.document.write(
"<table width=100% height=100%>"
);dlg.document.write(
"<tr><td align=center valign=middle>"
);dlg.document.write(
"<b><font size=2 face=verdana>"
+name+
"</font></b><br><br>"
);dlg.document.write(
"<img src="
+img+
">"
);dlg.document.write(
"</td></tr>"
);dlg.document.write(
"<tr><td align=center valign=middle>"
);dlg.document.write(
"<a href=# onClick=window.close();>"
);dlg.document.write(
"<font size=2 face=verdana>Click Here To Close Window</font></a>"
);dlg.document.write(
"</td></tr>"
);dlg.document.write(
"</table></body></html>"
);}
function GetCookie(name){var start=document.cookie.indexOf(name+
"="
);var len=start+name.length+1;if ((!start)&&(name !=document.cookie.substring(0,name.length))){return null;}
if (start==-1) return null;var end=document.cookie.indexOf(
";"
,len);if (end==-1) end=document.cookie.length;return unescape(document.cookie.substring(len,end));}
function SetCookie(name,value,expires,path,domain,secure){
var today=new Date();today.setTime(today.getTime());
if (expires&&typeof(expires)==
'number'
){expires=expires * 1000 * 60 * 60 * 24;}
var expires_date;if (typeof(expires)==
'number'
)
expires_date=new Date(today.getTime()+(expires));else
expires_date=expires;
document.cookie=name+
"="
+escape(value)+((expires)?
";expires="
+expires_date.toGMTString():
""
)+
((path)?
";path="
+path:
""
)+((domain)?
";domain="
+domain:
""
)+((secure)?
";secure"
:
""
);}
function DeleteCookie(name,path,domain){if (GetCookie(name)) document.cookie=name+
"="
+((path)?
";path="
+path:
""
)+((domain)?
";domain="
+domain:
""
)+
";expires=Thu, 01-Jan-1970 00:00:01 GMT"
;}
function GenericPopup(src){window.open(src,
"win"
,
"width=590,height=590,resizable=1,scrollbars=1,scrolling=auto"
)}
function RemoveStr(src,target){var result=src;var i=result.indexOf(target);if (i>-1)
{var left=result.substr(0,i);var right=result.substr(i+target.length);if (left.substr(left.length-1,1)==
","
){left=left.substr(0,left.length-1);}
if (right.substr(0,1)==
","
){right=right.substr(1);}
if (right.length>0&&left.length>0){result=left+
","
+right;}
else if (left.length>0){result=left;}
else
{result=right;}}
return (result);}
function SaveSearch(frm){SaveTrail(frm.query.value,null,null,
"Search"
,4);}
function ShowSearches(){var searches=GetCookie(
"Search"
);if (searches==null)
searches=
""
var trail=searches.split(
","
);while (trail.length>0&&trail[0]==
""
){trail.shift();l=trail.length;}
if (trail.length>0){document.write(
"<label>Your Recent Searches</label>"
);for (i=trail.length-1;(i>=trail.length-6)&&(i>=0);i--){document.write(
"<a href=http://search.store.yahoo.com/cgi-bin/nsearch?catalog=ytimes&query="
+escape(trail[i])+
">"
+unescape(trail[i])+
"</a><br>"
);}}}
function SaveTrail(id,name,img,cookie,size){var path=
""
;var path=GetCookie(cookie);if (path==null)
path=
""
;var elem;if (id&&name){elem=id+
"|"
+escape(name)+
"|"
+img;}
else
{elem=id;}
path=RemoveStr(path,elem);var trail=path.split(
","
);var l=trail.push(elem);while (trail.length>0&&trail[0]==
""
){trail.shift();l=trail.length;}
while (l>parseInt(size)){trail.shift();l=trail.length;}
path=trail.toString();
var dt=new Date();dt.setTime(dt.getTime()+72 * 60 * 60 * 1000);SetCookie(cookie,path,dt);}
function ShowTrail(){var path=GetCookie(
"Path"
);if (path==null)
path=
""
;var trail=path.split(
","
);while (trail.length>0&&trail[0]==
""
){trail.shift();l=trail.length;}
if (trail.length>0){document.write(
"<b>Recently Viewed Categories:</b><br><div id=trail><ul>"
);for (i=trail.length-1;(i>=trail.length-6)&&(i>=0);i--){elem=trail[i].split(
"|"
);if (elem[0].length>0){document.write (
"<li><a href="
+elem[0]+
".html>"
+unescape(elem[1])+
"</a></li> "
);}}
document.write(
"</ul></div>"
);}}
function ShowFullTrail(type){var ck=(type==
"Items"
?
"Path"
:
"Section"
);var path=GetCookie(ck);if (path==null)
path=
""
;var trail=path.split(
","
);while (trail.length>0&&trail[0]==
""
){trail.shift();l=trail.length;}
if (trail.length>0){var columns=2;var NewRow=true;var InRow=false;var colwid=100 / columns;document.write(
"<div id=recenthistory>"
);document.write(
"<img border=0 src=http://site.blissliving.com/recently-viewed.gif><br>"
);document.write(
"<table border=0 cellpadding=0 cellspacing=3>"
);var j=1;for (i=trail.length-1;i>=0;i--){if (NewRow){document.write(
"<tr valign=top>"
);NewRow=false;InRow=true;}
elem=trail[i].split(
"|"
);if (elem[0].length>0){document.write(
"<td width="
+colwid+
"%><table border=0 cellpadding=0 cellspacing=2 width=100%><tr><td align=center width=40>"
);if (elem[2].length>0){document.write (
"<img border=0 align=absmiddle src="
+elem[2]+
">&nbsp;"
);}
document.write(
"</td><td>"
);document.write(
"<a href="
+elem[0]+
".html>"
+unescape(elem[1].replace(
/`/gi,
"'"
).replace(
/%26%2396%3B/gi,
"'"
))+
"</a><br>"
);document.write(
"</td></tr></table></td>"
);}
if (j%columns==0){document.write(
"</tr>"
);NewRow=true;InRow=false;}
j++;}
if (InRow)
document.write(
"</tr>"
);document.write(
"</table></div>"
);}}
function ShowMoreLinks(){if (document.getElementById){document.getElementById(
'morebc'
).style.display=
'block'
;var mnu=document.getElementById(
"imenus0"
)
if (mnu){mnu.style.position=
"relative"
;mnu.style.left=
"0px"
;mnu.style.top=
"0px"
;mnu.style.display=
"block"
;}}}
var visset=0;function setItem(val){var elm=document.getElementById(
"inp"
+val);if(elm){elm.disabled=false;}visset+=1;}
function unsetItem(val){visset-=1;if(visset<=0){var elm=document.getElementById(
"inp"
+val);if(elm){elm.disabled=true;}}}
function inputSetItem(val){var elm=document.getElementById(
"inp"
+val);if(elm){elm.disabled=false;}visset+=1;}
function inputunSetItem(val){visset-=1;if(visset<=0){var elm=document.getElementById(
"inp"
+val);elm.disabled=true;}}
var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=false;String.prototype.find=function(what){return(this.indexOf(what)>=0?true:false);}
var oldonload=window.onload;if(typeof(NiftyLoad)!=
'function'
) NiftyLoad=function(){};if(typeof(oldonload)==
'function'
)
window.onload=function(){oldonload();AddCss();NiftyLoad()};else window.onload=function(){AddCss();NiftyLoad()};function AddCss(){niftyCss=true;var l=CreateEl(
"link"
);l.setAttribute(
"type"
,
"text/css"
);l.setAttribute(
"rel"
,
"stylesheet"
);l.setAttribute(
"href"
,
"/lib/yhst-80204245038479/niftyCorners.css"
);l.setAttribute(
"media"
,
"screen"
);document.getElementsByTagName(
"head"
)[0].appendChild(l);}
function Nifty(selector,options){if(niftyOk==false) return;if(niftyCss==false) AddCss();var i,v=selector.split(
","
),h=0;if(options==null) options=
""
;if(options.find(
"fixed-height"
))
h=getElementsBySelector(v[0])[0].offsetHeight;for(i=0;i<v.length;i++)
Rounded(v[i],options);if(options.find(
"height"
)) SameHeight(selector,h);}
function Rounded(selector,options){var i,top=
""
,bottom=
""
,v=new Array();if(options!=
""
){options=options.replace(
"left"
,
"tl bl"
);options=options.replace(
"right"
,
"tr br"
);options=options.replace(
"top"
,
"tr tl"
);options=options.replace(
"bottom"
,
"br bl"
);options=options.replace(
"transparent"
,
"alias"
);if(options.find(
"tl"
)){top=
"both"
;if(!options.find(
"tr"
)) top=
"left"
;}
else if(options.find(
"tr"
)) top=
"right"
;if(options.find(
"bl"
)){bottom=
"both"
;if(!options.find(
"br"
)) bottom=
"left"
;}
else if(options.find(
"br"
)) bottom=
"right"
;}
if(top==
""
&&bottom==
""
&&!options.find(
"none"
)){top=
"both"
;bottom=
"both"
;}
v=getElementsBySelector(selector);for(i=0;i<v.length;i++){FixIE(v[i]);if(top!=
""
) AddTop(v[i],top,options);if(bottom!=
""
) AddBottom(v[i],bottom,options);}}
function AddTop(el,side,options){var d=CreateEl(
"b"
),lim=4,border=
""
,p,i,btype=
"r"
,bk,color;d.style.marginLeft=
"-"
+getPadding(el,
"Left"
)+
"px"
;d.style.marginRight=
"-"
+getPadding(el,
"Right"
)+
"px"
;if(options.find(
"alias"
)||(color=getBk(el))==
"transparent"
){color=
"transparent"
;bk=
"transparent"
;border=getParentBk(el);btype=
"t"
;}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className=
"niftycorners"
;p=getPadding(el,
"Top"
);if(options.find(
"small"
)){d.style.marginBottom=(p-2)+
"px"
;btype+=
"s"
;lim=2;}
else if(options.find(
"big"
)){d.style.marginBottom=(p-10)+
"px"
;btype+=
"b"
;lim=8;}
else d.style.marginBottom=(p-5)+
"px"
;for(i=1;i<=lim;i++)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingTop=
"0"
;el.insertBefore(d,el.firstChild);}
function AddBottom(el,side,options){var d=CreateEl(
"b"
),lim=4,border=
""
,p,i,btype=
"r"
,bk,color;d.style.marginLeft=
"-"
+getPadding(el,
"Left"
)+
"px"
;d.style.marginRight=
"-"
+getPadding(el,
"Right"
)+
"px"
;if(options.find(
"alias"
)||(color=getBk(el))==
"transparent"
){color=
"transparent"
;bk=
"transparent"
;border=getParentBk(el);btype=
"t"
;}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className=
"niftycorners"
;p=getPadding(el,
"Bottom"
);if(options.find(
"small"
)){d.style.marginTop=(p-2)+
"px"
;btype+=
"s"
;lim=2;}
else if(options.find(
"big"
)){d.style.marginTop=(p-10)+
"px"
;btype+=
"b"
;lim=8;}
else d.style.marginTop=(p-5)+
"px"
;for(i=lim;i>0;i--)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingBottom=0;el.appendChild(d);}
function CreateStrip(index,side,color,border,btype){var x=CreateEl(
"b"
);x.className=btype+index;x.style.backgroundColor=color;x.style.borderColor=border;if(side==
"left"
){x.style.borderRightWidth=
"0"
;x.style.marginRight=
"0"
;}
else if(side==
"right"
){x.style.borderLeftWidth=
"0"
;x.style.marginLeft=
"0"
;}
return(x);}
function CreateEl(x){return(document.createElement(x));}
function FixIE(el){if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false)
el.style.display=
"inline-block"
;}
function SameHeight(selector,maxh){var i,v=selector.split(
","
),t,j,els=[],gap;for(i=0;i<v.length;i++){t=getElementsBySelector(v[i]);els=els.concat(t);}
for(i=0;i<els.length;i++){if(els[i].offsetHeight>maxh) maxh=els[i].offsetHeight;els[i].style.height=
"auto"
;}
for(i=0;i<els.length;i++){gap=maxh-els[i].offsetHeight;if(gap>0){t=CreateEl(
"b"
);t.className=
"niftyfill"
;t.style.height=gap+
"px"
;nc=els[i].lastChild;if(nc.className==
"niftycorners"
)
els[i].insertBefore(t,nc);else els[i].appendChild(t);}}}
function getElementsBySelector(selector){var i,j,selid=
""
,selclass=
""
,tag=selector,tag2=
""
,v2,k,f,a,s=[],objlist=[],c;if(selector.find(
"#"
)){
if(selector.find(
" "
)){
s=selector.split(
" "
);var fs=s[0].split(
"#"
);if(fs.length==1) return(objlist);f=document.getElementById(fs[1]);if(f){v=f.getElementsByTagName(s[1]);for(i=0;i<v.length;i++) objlist.push(v[i]);}
return(objlist);}
else{s=selector.split(
"#"
);tag=s[0];selid=s[1];if(selid!=
""
){f=document.getElementById(selid);if(f) objlist.push(f);return(objlist);}}}
if(selector.find(
"."
)){
s=selector.split(
"."
);tag=s[0];selclass=s[1];if(selclass.find(
" "
)){
s=selclass.split(
" "
);selclass=s[0];tag2=s[1];}}
var v=document.getElementsByTagName(tag);
if(selclass==
""
){for(i=0;i<v.length;i++) objlist.push(v[i]);return(objlist);}
for(i=0;i<v.length;i++){c=v[i].className.split(
" "
);for(j=0;j<c.length;j++){if(c[j]==selclass){if(tag2==
""
) objlist.push(v[i]);else{v2=v[i].getElementsByTagName(tag2);for(k=0;k<v2.length;k++) objlist.push(v2[k]);}}}}
return(objlist);}
function getParentBk(x){var el=x.parentNode,c;while(el.tagName.toUpperCase()!=
"HTML"
&&(c=getBk(el))==
"transparent"
)
el=el.parentNode;if(c==
"transparent"
) c=
"#FFFFFF"
;return(c);}
function getBk(x){var c=getStyleProp(x,
"backgroundColor"
);if(c==null||c==
"transparent"
||c.find(
"rgba(0, 0, 0, 0)"
))
return(
"transparent"
);if(c.find(
"rgb"
)) c=rgb2hex(c);return(c);}
function getPadding(x,side){var p=getStyleProp(x,
"padding"
+side);if(p==null||!p.find(
"px"
)) return(0);return(parseInt(p));}
function getStyleProp(x,prop){if(x.currentStyle)
return(x.currentStyle[prop]);if(document.defaultView.getComputedStyle)
return(document.defaultView.getComputedStyle(x,
''
)[prop]);return(null);}
function rgb2hex(value){var hex=
""
,v,h,i;var regexp=
/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1) hex+=
"0"
+v;else hex+=v;}
return(
"#"
+hex);}
function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4) step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1) x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1) y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1) r[i]=
"0"
+r[i];}
return(
"#"
+r[0]+r[1]+r[2]);}
