﻿//CustomHTML Begin
var CustomHTML = '';
//CustomHTML End
//Configs Begin
var AfAuthor = 'wendy';
var BfBulletin = 'wendy';
var CfEmail = 'aminliu@hotmail.com';
var EfSubTitle = 'YKL Glass wool: China Famous trademarks.';
var FfTheme = 'simple';
var GfTitle = 'YIKELONG Glass Wool Products COL.,Ltd.';
var HfCounterScript = '';
//Configs End
//Status Begin
var Writings=1;
var Reviews=1;
var Trackbacks=0;
//Status End
//LatestReviews Begin
var LatestReviews = new Array(  
'<li class="mli">Batmunkh Bazarsuren: <a href="'+Path+'ykl/about.html#Review"  title="Reviewing...">Reviewing...</a></li>');//LatestReviews End
//Directories Begin
var Directories = new Array(  
new Directory('ykl/index.html','YKL glass wool',1,'ykl'));//Directories End
//Menologies Begin
var Menologies = new Array(  
new Menology('2008-02',1,'2008-02.html'),
new Menology('Index &amp; Tags',-1,'index.html'));//Menologies End
//Resources Begin
var Resources = new Array( );//Resources End
//Specials Begin
var Specials = new Array(  
new Special('2008-2-14','ykl/about.html','Yikelong Glass Wool Products Co.,Ltd'));//Specials End
//RandomWritings Begin
var RandomWritings =             new Array(  
'<li class="mli"><a href="../ykl/about.html"  title="2008-2-14 21:20:24 Brief introduction to the Company Found in 2000, Hebei YiKeLong Glass Wool Products Co.,Ltd. Is a jointventure company, located at the Liugezhuang Development Zone of Dacheng County in the golden-triangle area of Jing-Jin-Lang with convenient come an">Yikelong Glass Wool Products Co.,Ltd</a></li>'       );//RandomWritings End
var Months = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
var YunY_Calendar = "";
var Now = new Date();
var When = new Date( Now.getFullYear(),Now.getMonth(),1);
var Special ="-";
function FindSpecial(SpecialDate){for(var i=0;i<Specials.length;i++){if(Specials[i].UpdateDate==SpecialDate){return i;}}return -1;}
function setMonthYear(){YunY_Calendar.rows[0].cells[1].innerHTML=Months[When.getMonth()]+" "+When.getFullYear();for(var i=0;i<6;i++)for(var j=0;j<7;j++){YunY_Calendar.rows[2+i].cells[j].innerHTML="";}for(var i=0;i<6;i++)for(var j=0;j<7;j++){if(  (i*7+j-When.getDay()+1)>0 && (i*7+j-When.getDay()+1)<=(32-(new Date( When.getFullYear(),(When.getMonth()),32)).getDate()) ){if(FindSpecial(When.getFullYear()+"-"+(When.getMonth()+1)+"-"+(i*7+j-When.getDay()+1))>-1){YunY_Calendar.rows[2+i].cells[j].innerHTML="<a href='"+Path+Specials[FindSpecial(When.getFullYear()+"-"+(When.getMonth()+1)+"-"+(i*7+j-When.getDay()+1))].LinkID+"' title='"+Specials[FindSpecial(When.getFullYear()+"-"+(When.getMonth()+1)+"-"+(i*7+j-When.getDay()+1))].Abstract+"' ><span class='tdStrong'>"+(i*7+j-When.getDay()+1)+"</span></a>";}else{YunY_Calendar.rows[2+i].cells[j].innerHTML=i*7+j-When.getDay()+1;}}}if((Now.getMonth()==When.getMonth())&&(Now.getFullYear()==When.getFullYear())){YunY_Calendar.rows[2+Math.floor((Now.getDate()+When.getDay()-1)/7)].cells[Now.getDay()].innerHTML="<font color='red'>"+Now.getDate()+"</font>";}}
function PreviousMonth(){if((When.getMonth()-1)<0){When = new Date( When.getFullYear()-1,(When.getMonth()+11)%12,1);}else{When = new Date( When.getFullYear(),(When.getMonth()+11)%12,1);}setMonthYear();}
function NextMonth(){if((When.getMonth()+1)>11){When = new Date( When.getFullYear()+1,(When.getMonth()+1)%12,1);}else{When = new Date( When.getFullYear(),(When.getMonth()+1)%12,1);}setMonthYear();}
function Directory(ID,Name,Quantity,Alias){this.ID=ID;this.Name=Name;this.Quantity=Quantity;this.Alias=Alias;}
function Menology(Name,Quantity,LinkID){this.Name=Name;this.Quantity=Quantity;this.LinkID=LinkID;}
function Special(UpdateDate,LinkID,Abstract){this.UpdateDate=UpdateDate;this.LinkID=LinkID;this.Abstract=Abstract;}
function DeleteReviewLink(ReviewID){if (getCookie("blogYunY")!=""){document.write('<a href="'+Path+'Process/ReviewDelete.asp?ID='+ReviewID+'">Delete</a>');}}
function DeleteReviewLink(ID){if (getCookie("blogYunY")!=""){document.write('<a href="'+Path+'Process/ReviewDelete.asp?ID='+ID+'">Delete</a>');}}
function indexOfD(dir){for(var i=0;i<Directories.length;i++){if(('/'+Directories[i].ID).indexOf('/'+dir+'/index.')==0)return i;}return -1;}
function E(ID){return document.getElementById(ID);}
function OKReviewLink(ID){if (getCookie("blogYunY")!=""){document.write('<a href="'+Path+'process/reviewaction.asp?id='+ID+'">OK?</a>');}}
function ShowReviewLink(ID){if (getCookie("blogYunY")!=""){document.write('<a href="'+Path+'process/reviewaction.asp?id='+ID+'">Show</a>');}}
function HideReviewLink(ID){if (getCookie("blogYunY")!=""){document.write('<a href="'+Path+'process/reviewaction.asp?a=hide&id='+ID+'">Hide</a> ');}}
function EditLink(WritingID){document.write(' <span style="cursor:pointer" onclick="if(document.getElementById(\'reviews\').style.display!=\'none\') {document.getElementById(\'reviews\').style.display=\'none\';document.reviewform.author.focus();} else document.getElementById(\'reviews\').style.display=\'block\';">[<strong>Review</strong>]</span>'); if (getCookie("blogYunY")!=""){document.write(' <a href="'+Path+'process/writingedit.asp?id='+WritingID+'">[Edit]</a>');}}
function Quote(ID){var qstr = document.getElementById('C'+ID).innerHTML.replace(/<.*?>/g,'').replace(/\[.*\]/g,''); if(qstr.length>10)qstr = qstr.substring(0,10) +'...'; document.reviewform.content.value+= '['+document.getElementById('A'+ID).innerHTML+':'+qstr+']\r\n'; document.reviewform.content.focus();}
function WriteDirectories(){document.write('<ul class="mul">');for(var i=0;i<Directories.length;i++){document.write('<li class="mli"><a href="'+Path+Directories[i].ID+'">'+Directories[i].Name+'</a> ['+Directories[i].Quantity+']</li>');}document.write('</ul>');}
function WriteResources(){document.write('<ul class="mul">');for(var i=0;i<Resources.length;i++){document.write(Resources[i]);}document.write('</ul>');}
function WriteMenologies(){document.write('<ul class="mul">');for(var i=0;i<Menologies.length;i++){document.write('<li class="mli"><a href="'+Path+'m/'+Menologies[i].LinkID+'">'+Menologies[i].Name+'</a>'+(Menologies[i].Quantity>-1?' ['+Menologies[i].Quantity+']':'')+'</li>');}document.write('</ul>');}
function WriteLastestReviews(){document.write('<ul class="mul">');for(var i=0;i<LatestReviews.length;i++){document.write(LatestReviews[i]);}document.write('</ul>');}
function WriteRandomWritings(){document.write('<ul class="mul">');for(var i=0;i<RandomWritings.length;i++){document.write(RandomWritings[i]);}document.write('</ul>');}
function ResizeImg(imgID){if(imgID.width>500)imgID.width=500;}
function getCookie(arg_CookieName){fromN=document.cookie.indexOf(arg_CookieName+"=")+0;if((fromN)!=-1){		fromN+=arg_CookieName.length+1; toN=document.cookie.indexOf(";",fromN)+0;	if(toN==-1){		toN=document.cookie.length}	return unescape(decodeURI(document.cookie.substring(fromN,toN)))	}	return ""	}
function Search(event,oInput){var keyCode=(event)?event.keyCode:keyStroke.which;if(keyCode==13){top.location=Path+"Process/Search.asp?Keywords="+oInput.value;return false;}return true;}function Search2(oInputId){var oInput=document.getElementById(oInputId);top.location=Path+"Process/Search.asp?Keywords="+oInput.value;return false;}
function Showdadv(){if(document.getElementById('dadv').style.display=='none'){document.getElementById('dadv').style.display='inline';document.getElementById('code').src='../process/code.asp';}}
function LoadLastUser(){if((getCookie('YunYNickName')!='')&&(getCookie('YunYHomePage')!='')){document.reviewform.author.value=getCookie('YunYNickName');document.reviewform.link.value=getCookie('YunYHomePage');}}
function MenologiesChart(){var maxy = 0;	var total = 12;	for(var i=Menologies.length-2;(i>-1 && i>Menologies.length-2-total);i--){	if(Menologies[i].Quantity>maxy) maxy=Menologies[i].Quantity;	}	 	var width = parseInt((Menologies.length-1)*50); 	var height = 100; 	var chd=""; 	var xl = ""; 	var chm=""; 	 	var t = 0; 	var totalv=0; 	for(var i=Menologies.length-2;(i>-1 && i>Menologies.length-2-total);i--){ 		var v = parseFloat(Menologies[i].Quantity*100/maxy).toFixed(4); 		chd +=v+','; 		xl +=Menologies[i].Name+'|'; 		chm +='o,FF9900,0,'+(Menologies.length-2-i)+',5.0|'; 		t++; 		totalv = totalv+parseFloat(Menologies[i].Quantity*100/maxy); 	} 	totalv = totalv/t/100; 	chm = 'h,dddddd,0,'+totalv.toFixed(4)+',1|'+chm; 	  	 	if(chd.length>0) chd = chd.substring(0,chd.length-1); 	if(xl.length>0) xl = xl.substring(0,xl.length-1);	 	if(chm.length>0) chm = chm.substring(0,chm.length-1); 	 	 	var yl = '|'+maxy/2+'|'+maxy; 	var chtt = 'Writings in the past months';	 	 	var url = 'http://chart.apis.google.com/chart?chs='+width+'x'+height+'&chd=t:'+chd+'&chtt='+chtt+'&chf=bg,s,f5f5f5&chm='+chm+'&cht=lc&chxt=x,y&chxl=0:|'+xl+'|1:|'+yl; 	if(t>5)document.write('<p><img src="'+url+'" /></p>');	 }