﻿function placeSWF(swfName, myWidth, myHeight, myTrans){
var mySWF = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ myWidth +'" height="'+ myHeight +'"><param name="movie" value="' + swfName + '"><param name="quality" value="high"><param name="wmode" value="'+ myTrans +'"><embed src="' + swfName + '"width="'+ myWidth +'" height="'+ myHeight +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="'+ myTrans +'"></embed></object>'
document.write(mySWF)
}

function limitLayer(){
currentWidth = document.body.offsetWidth
if(currentWidth < 1024){
document.getElementById("holder").style.left = "500px"
}
else{
document.getElementById("holder").style.left = "50%"
}
}

function resizewindow(){ 
window.focus()
w = screen.width
h = screen.height
resizeTo(w, h)
moveTo(0,0)
}

function showMenu(myMenu){
document.getElementById(myMenu).style.display = "inline"
}

function hideMenu(myMenu){
document.getElementById(myMenu).style.display = "none"
}


function checkPollA(){
if((document.mypoll.poll[0].checked == false)&&(document.mypoll.poll[1].checked == false)){
alert("חובה לבחור אחת מתוך שתי תשובות")
return false
}else{
return true
}
}

function checkPollB(){
if((document.mypoll.poll[0].checked == false)&&(document.mypoll.poll[1].checked == false)&&(document.mypoll.poll[2].checked == false)){
alert("חובה לבחור אחת מתוך שלש תשובות")
return false
}else{
return true
}
}

function checkPollC(){
if((document.mypoll.poll[0].checked == false)&&(document.mypoll.poll[1].checked == false)&&(document.mypoll.poll[2].checked == false)&&(document.mypoll.poll[3].checked == false)){
alert("חובה לבחור אחת מתוך ארבע תשובות")
return false
}else{
return true
}
}

function checkPollD(){
if((document.mypoll.poll[0].checked == false)&&(document.mypoll.poll[1].checked == false)&&(document.mypoll.poll[2].checked == false)&&(document.mypoll.poll[3].checked == false)&&(document.mypoll.poll[4].checked == false)){
alert("חובה לבחור אחת מתוך חמש תשובות")
return false
}else{
return true
}
}


function checkForumAdd(){
if(document.getElementById("title").value == ""){
alert("חובה לרשום כותרת")
document.getElementById("title").focus()
return false
}
}

function showHide(t,i){

if(document.getElementById(t).style.display == "none"){
document.getElementById(t).style.display = "inline"
if(i != "none"){
document.getElementById(i).src = "images/msgSubSel.jpg"
}
return false
}

if(document.getElementById(t).style.display == "inline"){
document.getElementById(t).style.display = "none"
if(i != "none"){
document.getElementById(i).src = "images/msgSub.jpg"
}
return false
}

}
