Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

1.3.6. Предел функции / 1.3.6. Предел функции

.htm
Скачиваний:
38
Добавлен:
10.02.2015
Размер:
61.03 Кб
Скачать

1.3.6. Предел функции .all { clear: both; } .left { clear: left; } .right { clear: right; } var fixX=0, fixY=0; function testbar_DoFSCommand(command, args){ if(command == "journal") goto_register(); if(command == "test") document.location.href = "test1.html"; if(command == "task") document.location.href = "task1.html"; if(command == "tsol") document.location.href = "tsol1.html"; if(command == "cquest") document.location.href = ""; if(command == "lab"){ saveLocation(); document.location.href = ""; } } function saveLocation(){ window.top.frames[0].chapterNumber = ("1" == "") ? "0" : "1"; window.top.frames[0].sectionNumber = ("3" == "") ? "0" : "3"; window.top.frames[0].paragraphNumber = ("6" == "") ? "0" : "6"; window.top.frames[0].subparagraphNumber = ("" == "") ? "0" : ""; } function openMagFlash(swf){ try{ var imgForMag = new Image(); imgForMag.src = swf + '.none'; screenHeight = screen.height-60; screenWidth = screen.width-80; var i=0; do { modelHeight = imgForMag.height; modelWidth = imgForMag.width; i++; if (i == 3) { modelHeight = 150; modelWidth = 200; break;} } while (modelWidth==0 || modelHeight==0); if(screenHeight*modelWidth/modelHeight < screenWidth){ magWidth = screenHeight*modelWidth/modelHeight; magHeight = screenHeight; }else{ magWidth = screenWidth; magHeight = screenWidth*modelHeight/modelWidth; } magWnd = open("","myWin","width=" + magWidth + ",height=" + magHeight + ",location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no"); magWnd.close(); magWnd = open("","myWin","width=" + magWidth + ",height=" + magHeight + ",location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no"); magWnd.moveTo(0.5*(screen.width-magWidth),0) magWnd.document.open(); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write('function resizeFlash(){'); magWnd.document.write('w = document.body.clientWidth;'); magWnd.document.write('h = document.body.clientHeight;'); magWnd.document.write('if(w > 0 && h > 0){'); magWnd.document.write('if(w\/' + magWidth + ' > h\/' + magHeight + '){'); magWnd.document.write('document.all.maggedFlash.height = h;'); magWnd.document.write('document.all.maggedFlash.width = ' + magWidth + '\/' + magHeight + '*h;'); magWnd.document.write('}else{'); magWnd.document.write('document.all.maggedFlash.width = w;'); magWnd.document.write('document.all.maggedFlash.height = ' + magHeight + '\/' + magWidth + '*w;'); magWnd.document.write('}'); magWnd.document.write('}'); magWnd.document.write('}'); magWnd.document.write('window.onresize = new Function("resizeFlash()");'); magWnd.document.write('document.onkeypress = new Function("if(event.keyCode == 27) window.close()")'); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.close(); magWnd.document.title = "Лупа"; magWnd.focus(); }catch(e){ } } function openMagImg(name){ try{ var imgForMag = new Image(); imgForMag.src = name; screenHeight = screen.height-60; screenWidth = screen.width-80; var i=0; do { imgHeight = imgForMag.height; imgWidth = imgForMag.width; i++; if (i == 3) { imgHeight = 300; imgWidth = 400; break;} } while (imgHeight==0 || imgWidth ==0); if(screenHeight*imgWidth/imgHeight < screenWidth){ magWidth = screenHeight*imgWidth/imgHeight; magHeight = screenHeight; }else{ magWidth = screenWidth; magHeight = screenWidth*imgHeight/imgWidth; } magWnd = open("","myWin","width=" + magWidth + ",height=" + magHeight + ",location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no"); magWnd.moveTo(0.5*(screen.width-magWidth),0) magWnd.document.open(); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.write('function resizeImage(){'); magWnd.document.write('w = document.body.clientWidth;'); magWnd.document.write('h = document.body.clientHeight;'); magWnd.document.write('if(w > 0 && h > 0){'); magWnd.document.write('if(w\/' + magWidth + ' > h\/' + magHeight + '){'); magWnd.document.write('document.all.maggedImage.height = h;'); magWnd.document.write('document.all.maggedImage.width = ' + magWidth + '\/' + magHeight + '*h;'); magWnd.document.write('}else{'); magWnd.document.write('document.all.maggedImage.width = w;'); magWnd.document.write('document.all.maggedImage.height = ' + magHeight + '\/' + magWidth + '*w;'); magWnd.document.write('}'); magWnd.document.write('}'); magWnd.document.write('}'); magWnd.document.write('window.onresize = new Function("resizeImage()");'); magWnd.document.write('document.onkeypress = new Function("if(event.keyCode == 27) window.close()")'); magWnd.document.write(''); magWnd.document.write(''); magWnd.document.close(); magWnd.document.title = "Лупа"; magWnd.focus(); } catch(e){ } } function moveDiv(e){ try{ newX = event.clientX; newY = event.clientY; div3d.style.left = newX+5+document.body.scrollLeft; div3d.style.top = newY+15+document.body.scrollTop; divmodel.style.left = newX+8+document.body.scrollLeft; divmodel.style.top = newY+18+document.body.scrollTop; divimg.style.left = newX+8+document.body.scrollLeft; divimg.style.top = newY+18+document.body.scrollTop; }catch(e){ } } document.onmousemove= new Function("moveDiv()"); window.onscroll=new Function("moveDiv()"); function open3Dformula(filename){ try{ if(screen.width Смотрите также: Смотрите также: