csCreate - Edit
in(explode)
Resize TextArea
Cols X
Rows
Powered by: CGI
Script.net
if(GetCookie('cscreatecols')){
document.form1.cols.value=GetCookie('cscreatecols');
}
else{
document.form1.cols.value=document.form1.explode.cols;
}
if(GetCookie('cscreaterows')){
document.form1.rows.value=GetCookie('cscreaterows');
}
else{
document.form1.rows.value=document.form1.explode.rows;
}
ChangeSize();
function ChangeSize(){
var cols = document.form1.cols.value;
var rows = document.form1.rows.value;
var maxr = ((screen.availHeight-200)/75)*5;
var maxc = ((((screen.availWidth-200)/100)*15))/1.1;
if(rows > maxr){
rows=maxr;
}
if(cols > maxc){
cols=maxc;
}
document.form1.explode.cols=cols;
document.form1.explode.rows=rows;
var resizex= (100 * (document.form1.cols.value/15))+200 + (document.form1.cols.value*.75);
var resizey= (75 * (document.form1.rows.value/5))+235;
if(resizex > screen.availWidth){
resizex = screen.availWidth;
}
if(resizey > screen.availHeight){
resizey = screen.availHeight;
}
window.resizeTo(resizex,resizey);
var l = (screen.availWidth/2) - (resizex/2);
var t = (screen.availHeight/2) - (resizey/2);
window.moveTo(l,t);
document.cookie="cscreatecols="+document.form1.cols.value+";expires='Thu, 24-Jul-03 00:00:01 GMT";
document.cookie="cscreaterows="+document.form1.rows.value+";expires='Thu, 24-Jul-03 00:00:01 GMT";
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function FixCookieDate (date) {
var base = new Date(0);
var skew = base.getTime(); // dawn of (Unix) time - should be 0
if (skew > 0) // Except on the Mac - ahead of its time
date.setTime (date.getTime() - skew);
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name,value,expires,path,domain,secure) {
document.cookie = name + "=" + escape (value) +
((expires) ? "; expires=" + expires.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-70 00:00:01 GMT";
}
}
Wyszukiwarka
Podobne podstrony:
grupa A kolos TiT 2015TiT kolokwium 2 teoria56 tittitTIT 21 bifonic 21CTV5 TK256 Tit56 tittit56 titgrupa B kolos TiT 2015Bone App#3 titwięcej podobnych podstron